/**
 * Résumé Studio layout and tool chrome.
 *
 * The document preview (.pps-studio__paper) is intentionally typographic only.
 * Anything decorative there would defeat the purpose of the tool.
 */

/* ------------------------------------------------------------------ shell */

.pps-studio {
	margin-block: 0 4rem;
}

.pps-studio__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	padding-bottom: 1rem;
	border-bottom: 1px solid var(--pps-color-border, #d6d2c8);
	margin-bottom: 1.75rem;
}

.pps-studio__title {
	font-size: clamp(1.75rem, 3vw, 2.35rem);
	line-height: 1.15;
	margin: 0;
	letter-spacing: -0.01em;
}

.pps-studio__note {
	margin: 0;
	font-family: var(--pps-font-mono, ui-monospace, monospace);
	font-size: 0.8rem;
	color: var(--pps-color-muted, #5c6570);
}

.pps-studio__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 2.25rem;
	align-items: start;
}

/* --------------------------------------------------------------- the form */

.pps-studio__form {
	display: grid;
	gap: 1.5rem;
}

.pps-studio__pane {
	background: var(--pps-color-surface, #f7f5f0);
	border: 1px solid var(--pps-color-border, #d6d2c8);
	border-radius: 6px;
	padding: 1.25rem 1.35rem 1.4rem;
}

.pps-studio__pane-title {
	font-size: 1.05rem;
	margin: 0 0 0.35rem;
	letter-spacing: -0.005em;
}

.pps-studio__hint {
	margin: 0 0 0.9rem;
	font-size: 0.85rem;
	line-height: 1.5;
	color: var(--pps-color-muted, #5c6570);
}

.pps-studio__row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 0 1rem;
}

.pps-studio__field-note {
	margin: 0;
}

.pps-studio__add {
	margin: 1rem 0 0;
}

/* Repeatable entries */

.pps-studio__item {
	background: var(--pps-color-white, #fff);
	border: 1px solid var(--pps-color-border, #d6d2c8);
	border-radius: 5px;
	padding: 1rem 1.1rem 0.25rem;
	margin-bottom: 1rem;
}

.pps-studio__item.is-new {
	animation: pps-studio-in 220ms ease-out;
}

@keyframes pps-studio-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}

.pps-studio__item-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 0 0 0.75rem;
}

.pps-studio__item-num {
	font-family: var(--pps-font-mono, ui-monospace, monospace);
	font-size: 0.78rem;
	letter-spacing: 0.08em;
	color: var(--pps-color-muted, #5c6570);
}

.pps-studio__remove {
	background: none;
	border: 0;
	padding: 0.15rem 0.3rem;
	font: inherit;
	font-size: 0.8rem;
	color: var(--pps-color-accent-ink, #856419);
	text-decoration: underline;
	cursor: pointer;
	border-radius: 3px;
}

.pps-studio__remove:hover {
	color: var(--pps-color-primary, #0b1d3a);
}

.pps-studio__remove:focus-visible {
	outline: 2px solid var(--pps-color-accent, #c8a44e);
	outline-offset: 2px;
}

/*
 * Screen-reader-only label. It must not wrap its control: the clip below is
 * 1px x 1px with overflow:hidden, so anything nested inside it collapses with
 * it. The repeating role and education fields use for/id instead.
 */
.pps-studio__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------- actions */

.pps-studio__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	padding-top: 0.25rem;
}

/* -------------------------------------------------------------- preview */

.pps-studio__preview {
	position: sticky;
	top: 1.5rem;
}

.pps-studio__preview-bar {
	margin-bottom: 0.75rem;
}

.pps-studio__preview-bar .pps-studio__hint {
	margin-bottom: 0;
}

.pps-studio__paper {
	background: #fff;
	border: 1px solid var(--pps-color-border, #d6d2c8);
	border-radius: 4px;
	padding: 2rem 2.1rem;
	min-height: 30rem;
	/* Readable, document-like, and nothing else. */
	font-family: var(--pps-font-body, "IBM Plex Sans", system-ui, sans-serif);
	font-size: 0.925rem;
	line-height: 1.5;
	color: #1a1a1a;
	box-shadow: 0 1px 3px rgba(11, 29, 58, 0.06);
}

.pps-studio__empty {
	margin: 0;
	color: var(--pps-color-muted, #5c6570);
	font-style: italic;
}

.pps-studio__doc-name {
	font-size: 1.4rem;
	margin: 0 0 0.15rem;
	line-height: 1.2;
}

.pps-studio__doc-contact {
	margin: 0 0 1.1rem;
	font-size: 0.855rem;
	line-height: 1.5;
	color: #333;
}

.pps-studio__paper h2 {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.09em;
	margin: 1.5rem 0 0.4rem;
	padding-bottom: 0.2rem;
	border-bottom: 1px solid #ccc;
}

.pps-studio__paper h3 {
	font-size: 0.925rem;
	margin: 0.9rem 0 0.1rem;
}

.pps-studio__paper p {
	margin: 0.3rem 0;
}

.pps-studio__paper ul {
	margin: 0.35rem 0 0.5rem;
	padding-left: 1.1rem;
}

.pps-studio__paper li {
	margin-bottom: 0.2rem;
}

.pps-studio__doc-dates {
	font-size: 0.83rem;
	color: #555;
	margin: 0 0 0.2rem !important;
}

/* ------------------------------------------------------------- checklist */

.pps-studio__checklist {
	margin-top: 2.25rem;
	padding: 1.4rem 1.5rem;
	background: var(--pps-color-surface, #f7f5f0);
	border-radius: var(--pps-rounded-md);
	box-shadow: inset 0 0 0 1px var(--pps-color-accent, #c8a44e);
}

.pps-studio__checklist .pps-list {
	margin: 0 0 0.75rem;
}

.pps-studio__checklist code {
	font-family: var(--pps-font-mono, ui-monospace, monospace);
	font-size: 0.85em;
	background: rgba(11, 29, 58, 0.07);
	padding: 0.1em 0.35em;
	border-radius: 3px;
}

.pps-studio__foot {
	margin: 0;
	font-size: 0.9rem;
}

/* ---------------------------------------------------------- responsiveness */

@media (max-width: 1023px) {
	.pps-studio__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.75rem;
	}

	.pps-studio__preview {
		position: static;
	}
}

@media (max-width: 767px) {
	.pps-studio__paper {
		padding: 1.4rem 1.25rem;
		min-height: 20rem;
	}

	.pps-studio__actions .pps-btn {
		flex: 1 1 auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pps-studio__item.is-new {
		animation: none;
	}
}

/* --------------------------------------------------------------- printing */

@media print {
	.pps-studio__bar,
	.pps-studio__form,
	.pps-studio__checklist {
		display: none !important;
	}

	.pps-studio__preview-bar {
		display: none;
	}

	.pps-studio__paper {
		border: 0;
		box-shadow: none;
		padding: 0;
	}
}
