@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@400;500;600;700&display=swap');

.bce-fullwidth { width: 100%; box-sizing: border-box; }

.bce-form-wrap, .bce-dashboard-wrap, .bce-table-wrap, .bce-view-wrap {
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
}

.bce-field { margin-bottom: 24px !important; }
.bce-field label { display: block; font-weight: 600; margin-bottom: 6px; }
.bce-required { color: #b32d2e; }
.bce-help-text { font-size: 12px; color: #666; margin: 4px 0 8px; }

.bce-field input[type=text], .bce-field input[type=number], .bce-field input[type=email],
.bce-field input[type=url], .bce-field input[type=date], .bce-field input[type=file],
.bce-field select, .bce-field textarea {
	width: 100%; padding: 11px 13px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; font-size: 14px;
}

.bce-radio-group, .bce-checkbox-group { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 4px; }
.bce-inline-choice { font-weight: normal; display: inline-flex; align-items: center; gap: 4px; }
.bce-bold-labels { font-weight: 700; }

.bce-cond-managed { transition: opacity 0.15s ease; }

.bce-repeater-items { display: flex; flex-direction: column; gap: 20px; margin-bottom: 12px; }
.bce-repeater-card {
	position: relative;
	border: 1px solid #e2e2e2;
	border-radius: 8px;
	background: #fff;
	padding: 24px 24px 16px;
}
.bce-repeater-card .bce-field { margin-bottom: 16px !important; }
.bce-repeater-card .bce-field:last-child { margin-bottom: 0 !important; }
.bce-repeater-remove {
	position: absolute; top: 12px; right: 12px;
	background: #f8d7da; color: #721c24; border: 1px solid #f3a9a9;
	border-radius: 4px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.bce-repeater-remove:hover { background: #f3a9a9; }
.bce-repeater-add { margin-top: 4px; }

.bce-repeater-view-grid { display: flex; flex-wrap: wrap; gap: 16px; margin: 8px 0; }
.bce-repeater-view-card {
	display: flex; flex-direction: column; gap: 10px;
	border: 1px solid #e2e2e2; border-radius: 8px; background: #fff;
	padding: 16px; width: 260px; box-sizing: border-box;
}
.bce-repeater-view-media { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.bce-repeater-view-thumb { max-width: 100%; max-height: 160px; border-radius: 4px; object-fit: cover; }
.bce-repeater-view-file-label { font-weight: 600; font-size: 12px; color: #555; margin: 0; }
.bce-repeater-view-details p { margin: 0 0 6px; font-size: 13px; }
.bce-repeater-view-details p:last-child { margin-bottom: 0; }
.bce-repeater-view-links { margin: 0 0 10px; padding-left: 18px; font-size: 13px; }
.bce-repeater-view-links li { margin-bottom: 4px; word-break: break-all; }

.bce-repeater-alert {
	margin: 4px 0 16px !important;
	padding: 12px 16px !important;
}
.bce-repeater-alert strong { display: block; margin-bottom: 4px; }
.bce-repeater-alert p { margin: 0; font-size: 13px; line-height: 1.5; }

.bce-field-delivery { margin-bottom: 20px !important; }
.bce-field-delivery .bce-radio-group { margin-top: 4px; }
.bce-delivery-upload-wrap {
	margin-top: 12px;
	padding: 12px 14px;
	background: #f7f9fb;
	border: 1px solid #e2e2e2;
	border-radius: 4px;
}
.bce-delivery-upload-wrap label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; }
.bce-delivery-email-note { font-style: italic; color: #666; margin-top: 8px !important; }

.bce-author-list { margin-bottom: 20px !important; }
.bce-author-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.bce-author-row {
	display: flex;
	gap: 10px;
	align-items: center;
}
.bce-author-row input[type=text] {
	flex: 1 1 50%;
	padding: 9px 11px;
	box-sizing: border-box;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
}
.bce-author-remove {
	flex-shrink: 0;
	background: #f8d7da;
	color: #721c24;
	border: 1px solid #f3a9a9;
	border-radius: 4px;
	width: 32px;
	height: 32px;
	line-height: 1;
	font-size: 16px;
	cursor: pointer;
}
.bce-author-remove:hover { background: #f3a9a9; }
.bce-author-add { margin-top: 4px; }

.bce-consent-wrap { margin-top: 4px; }
.bce-consent-box {
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fafafa;
	padding: 14px 16px;
	max-height: 140px;
	overflow: hidden;
	position: relative;
	font-size: 14px;
	line-height: 1.6;
	transition: max-height 0.25s ease;
}
.bce-consent-box:not(.bce-consent-expanded)::after {
	content: "";
	position: absolute;
	bottom: 0; left: 0; right: 0;
	height: 40px;
	background: linear-gradient(rgba(250,250,250,0), rgba(250,250,250,0.95));
	pointer-events: none;
}
.bce-consent-box.bce-consent-expanded { max-height: 2000px; }
.bce-consent-toggle {
	display: inline-block;
	margin: 8px 0 14px;
	background: none;
	border: none;
	color: #2271b1;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}
.bce-consent-toggle:hover { color: #135e96; }
.bce-consent-confirm {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	background: #f0f6fc;
	border: 1px solid #c3d9ec;
	border-radius: 4px;
	padding: 12px 16px;
	cursor: pointer;
	font-weight: 500;
}
.bce-consent-confirm input[type=checkbox] {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	flex-shrink: 0;
	cursor: pointer;
}
.bce-consent-confirm:has(input:checked) {
	background: #d4edda;
	border-color: #a8dfa8;
}

.bce-block-heading { margin: 40px 0 8px !important; }
.bce-block-subheading { color: #666; margin: 0 0 8px; }
.bce-block-divider { border: none; border-top: 1px solid #ddd; margin: 40px 0 !important; }
.bce-block-html { margin: 20px 0 !important; }
.bce-block-alert { background: #e0f0ff; border: 1px solid #a9d3f3; color: #1c4b73; padding: 16px 20px !important; border-radius: 4px; margin: 24px 0 !important; }

.bce-submit-button {
	background: #2271b1; color: #fff; border: none; padding: 11px 24px; border-radius: 4px; cursor: pointer; font-size: 15px;
}
.bce-submit-button:hover { background: #135e96; }

.bce-notice { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-size: 14px; }
.bce-notice-success { background: #d4edda; color: #155724; border: 1px solid #a8dfa8; }
.bce-notice-error { background: #f8d7da; color: #721c24; border: 1px solid #f3a9a9; }
.bce-notice-info { background: #e0f0ff; color: #1c4b73; border: 1px solid #a9d3f3; }

.bce-frontend-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bce-frontend-table th, .bce-frontend-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e0e0e0; }
.bce-frontend-table th { background: #f5f5f5; font-weight: 600; }

.bce-status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.bce-category-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 700;
	color: #fff;
	margin-right: 8px;
	letter-spacing: 0.3px;
}
.bce-status-received { background: #d1ecf1; color: #0c5460; }
.bce-status-pending { background: #fff3cd; color: #856404; }
.bce-status-approved { background: #d4edda; color: #155724; }
.bce-status-rejected { background: #f8d7da; color: #721c24; }

.bce-delete-link { color: #b32d2e; text-decoration: none; font-weight: 600; }
.bce-delete-link:hover { text-decoration: underline; }
.bce-empty { padding: 14px 0; color: #666; }

.bce-profile-header {
	display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
	background: #f8f9fa; border: 1px solid #e2e2e2; border-radius: 6px; padding: 20px; margin-bottom: 20px;
}
.bce-profile-header img { border-radius: 50%; }
.bce-profile-info h3 { margin: 0 0 4px; }
.bce-profile-info p { margin: 0; color: #555; }
.bce-profile-stats { display: flex; gap: 20px; margin-left: auto; }
.bce-stat { text-align: center; }
.bce-stat-number { display: block; font-size: 22px; font-weight: 700; }
.bce-stat-label { display: block; font-size: 12px; color: #666; text-transform: uppercase; }

.bce-judge-feedback { background: #f8f9fa; border: 1px solid #e2e2e2; border-radius: 6px; padding: 14px 16px; margin-bottom: 12px; }
.bce-judge-badge { font-weight: 700; text-decoration: none; }
.bce-judge-badge:hover { text-decoration: underline; }

.bce-star-rating { display: flex; gap: 4px; align-items: center; }
.bce-star-btn {
	background: none; border: none; padding: 0; margin: 0;
	font-size: 30px; line-height: 1; color: #d9d9d9; cursor: pointer;
	transition: color 0.1s ease;
}
.bce-star-btn.bce-star-filled { color: #f5b301; }
.bce-star-btn:focus-visible { outline: 2px solid #2271b1; outline-offset: 2px; }

.bce-rubric-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.bce-rubric-table th, .bce-rubric-table td { padding: 6px 8px; text-align: left; }
.bce-rubric-table input[type=number] { width: 100px; }

.bce-version-list { list-style: disc; padding-left: 20px; }
.bce-version-list li { margin-bottom: 4px; }

.bce-card-container {
	border: 1px solid #e2e2e2 !important;
	border-radius: 8px;
	background: #fafafa;
	padding: 28px 32px !important;
	margin: 36px 0 !important;
	box-sizing: border-box;
}
.bce-card-container > summary { cursor: pointer; font-weight: 700; font-size: 16px; margin-bottom: 12px !important; }
.bce-card-container .bce-block-heading { margin-top: 0 !important; }
.bce-card-container .bce-field:last-child { margin-bottom: 4px !important; }

.bce-view-header-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.bce-view-header-row h3 { margin: 0; }
.bce-export-buttons { text-align: right; }

.bce-attachments-grid { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; }
.bce-attachment-card {
	border: 1px solid #e2e2e2; border-radius: 6px; padding: 12px; width: 180px; text-align: center; background: #fff;
}
.bce-attachment-thumb { max-width: 100%; max-height: 140px; border-radius: 4px; object-fit: cover; }
.bce-attachment-icon { font-size: 48px; line-height: 1; padding: 30px 0; color: #999; }
.bce-attachment-label { font-weight: 600; margin: 8px 0 2px; font-size: 13px; }
.bce-attachment-name { font-size: 12px; color: #666; margin: 0 0 8px; word-break: break-all; }

.bce-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.bce-filters select {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	/* Defensive reset: force plain, predictable rendering regardless of
	   any external styling (theme, another plugin, or a browser
	   extension) that might otherwise apply an unexpected font, color
	   gradient, or decoration to this element's text. */
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
	font-style: normal !important;
	font-weight: 400 !important;
	color: #1d2327 !important;
	background-color: #fff !important;
	background-image: none !important;
	text-decoration: none !important;
	text-shadow: none !important;
	-webkit-text-fill-color: initial !important;
	letter-spacing: normal !important;
}
.bce-filters select option {
	font-family: inherit !important;
	color: inherit !important;
	background: #fff !important;
	text-decoration: none !important;
}

/* -------------------------------------------------------------------
 * Mobile responsiveness: [render_competition_form], [my_competition_submissions],
 * [view_submission], and [judge_dashboard]. Visual-only adjustments —
 * no markup changes required since tables are already wrapped in
 * .bce-table-wrap and grids already use flex-wrap.
 * ------------------------------------------------------------------- */
@media ( max-width: 782px ) {
	/* Author list (Name Surname + Age): stack the two fields instead of
	   squeezing them side by side on a narrow screen. */
	.bce-author-row {
		flex-wrap: wrap;
	}
	.bce-author-row input[type=text] {
		flex: 1 1 100%;
	}

	/* Rubric table (numeric score inputs) keeps horizontal scroll —
	   it's a small grid of number fields, not a list of records, so
	   card-stacking doesn't make sense for it. */
	.bce-rubric-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		min-width: 560px;
	}

	/* --- Submission list tables: stack into cards instead of a --------
	   squeezed/scrolling table. Column labels are injected via CSS
	   (::before + nth-child), since the column order is fixed and
	   known — no HTML changes needed. --------------------------------- */
	.bce-dashboard-wrap .bce-frontend-table,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table {
		border: none;
	}

	.bce-dashboard-wrap .bce-frontend-table thead,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table thead {
		display: none; /* Column headers are replaced by per-cell labels below. */
	}

	.bce-dashboard-wrap .bce-frontend-table tr,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table tr {
		display: block;
		border: 1px solid #e0e0e0;
		border-radius: 6px;
		margin-bottom: 12px;
		padding: 4px 14px;
		background: #fff;
	}

	.bce-dashboard-wrap .bce-frontend-table td,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		text-align: right;
		border-bottom: 1px solid #f0f0f0;
		padding: 10px 0;
	}
	.bce-dashboard-wrap .bce-frontend-table tr td:last-child,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table tr td:last-child {
		border-bottom: none;
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
		gap: 6px;
	}
	.bce-dashboard-wrap .bce-frontend-table tr td:last-child::before,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table tr td:last-child::before {
		margin-bottom: 2px;
	}
	.bce-dashboard-wrap .bce-frontend-table tr td:last-child a,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table tr td:last-child a {
		display: inline-block;
		margin-right: 14px;
	}

	.bce-dashboard-wrap .bce-frontend-table td::before,
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td::before {
		font-weight: 600;
		text-align: left;
		color: #555;
		flex-shrink: 0;
	}

	/* My Submissions ([my_competition_submissions]): Competition | Date | Status | Action */
	.bce-dashboard-wrap .bce-frontend-table td:nth-child(1)::before { content: "Competition"; }
	.bce-dashboard-wrap .bce-frontend-table td:nth-child(2)::before { content: "Date"; }
	.bce-dashboard-wrap .bce-frontend-table td:nth-child(3)::before { content: "Status"; }
	.bce-dashboard-wrap .bce-frontend-table td:nth-child(4)::before { content: "Action"; }

	/* Judge Dashboard ([judge_dashboard]): Competition | Participant | Date | Status | My Evaluation | Action */
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td:nth-child(1)::before { content: "Competition"; }
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td:nth-child(2)::before { content: "Participant"; }
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td:nth-child(3)::before { content: "Date"; }
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td:nth-child(4)::before { content: "Status"; }
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td:nth-child(5)::before { content: "My Evaluation"; }
	.bce-fullwidth.bce-table-wrap > .bce-frontend-table td:nth-child(6)::before { content: "Action"; }

	/* "Submitted Data" table (and the repeater's own field/value row):
	   each <tr> holds one <th>label + <td>value pair — stack them so
	   the label always has full width to read, instead of being
	   squeezed by its inline style="width:220px" on narrow screens. */
	.bce-view-wrap table.bce-frontend-table tbody tr:has( th ) {
		display: block;
		margin-bottom: 14px;
	}
	.bce-view-wrap table.bce-frontend-table tbody tr:has( th ) th,
	.bce-view-wrap table.bce-frontend-table tbody tr:has( th ) td {
		display: block;
		width: 100% !important; /* overrides the inline style="width:220px" */
		box-sizing: border-box;
		padding: 4px 0;
	}
	.bce-view-wrap table.bce-frontend-table tbody tr:has( th ) th {
		border-bottom: none;
		padding-bottom: 2px;
		font-size: 13px;
		color: #555;
	}
	.bce-view-wrap table.bce-frontend-table tbody tr:has( th ) td {
		border-bottom: 1px solid #eee;
		padding-bottom: 12px;
	}

	/* "All Judge Evaluations" (judge-only): a genuine multi-column
	   record table (column headers in <thead>), so it gets the same
	   card-stacking treatment as the submission list tables. */
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) thead {
		display: none;
	}
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) tr {
		display: block;
		border: 1px solid #e0e0e0;
		border-radius: 6px;
		margin-bottom: 12px;
		padding: 4px 14px;
		background: #fff;
	}
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 12px;
		text-align: right;
		border-bottom: 1px solid #f0f0f0;
		padding: 10px 0;
	}
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td::before {
		font-weight: 600;
		text-align: left;
		color: #555;
		flex-shrink: 0;
	}
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td:nth-child(1)::before { content: "Judge"; }
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td:nth-child(2)::before { content: "Score"; }
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td:nth-child(3)::before { content: "Public Feedback"; }
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td:nth-child(4)::before { content: "Private Notes"; }
	.bce-view-wrap table.bce-frontend-table:not( :has( tbody tr th ) ) td:nth-child(5)::before { content: "Visibility"; }

	/* Profile header: stack avatar/info/stats instead of a tight row. */
	.bce-profile-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 14px;
		padding: 16px;
	}
	.bce-profile-stats {
		margin-left: 0;
		width: 100%;
		justify-content: space-between;
		gap: 10px;
	}

	/* Judge/participant filter bar: full-width stacked controls. */
	.bce-filters {
		flex-direction: column;
		align-items: stretch;
	}
	.bce-filters select,
	.bce-filters button {
		width: 100%;
	}

	/* Submission view header (title + Export button) stacks cleanly. */
	.bce-view-header-row {
		flex-direction: column;
		align-items: flex-start;
	}
	.bce-view-header-row button {
		width: 100%;
	}

	/* Section/card containers: less padding so content isn't cramped
	   on narrow screens. */
	.bce-card-container {
		padding: 18px 16px !important;
		margin: 24px 0 !important;
	}
	.bce-block-heading {
		margin: 28px 0 8px !important;
	}
	.bce-block-divider {
		margin: 28px 0 !important;
	}

	/* Repeater cards (Student Work) and attachment/version cards: allow
	   full-width single-column stacking instead of a fixed px width
	   that can overflow a narrow viewport. */
	.bce-repeater-card {
		padding: 16px 14px 12px;
	}
	.bce-repeater-remove {
		position: static;
		display: block;
		width: 100%;
		text-align: center;
		margin-bottom: 12px;
	}
	.bce-attachment-card,
	.bce-repeater-view-card {
		width: 100%;
		flex: 1 1 100%;
	}

	/* Star rating: larger tap targets for touch. */
	.bce-star-btn {
		font-size: 34px;
		padding: 4px;
	}

	/* Choice groups: stack vertically for easier tapping instead of a
	   cramped inline-wrap row. */
	.bce-radio-group,
	.bce-checkbox-group {
		flex-direction: column;
		gap: 10px;
	}

	/* Buttons/links get a bit more breathing room to tap accurately. */
	.bce-submit-button {
		width: 100%;
		padding: 13px 20px;
		font-size: 16px;
	}
	.bce-consent-confirm {
		padding: 14px;
	}
}

@media ( max-width: 480px ) {
	.bce-stat-number { font-size: 18px; }
	.bce-stat-label { font-size: 10px; }
	.bce-profile-header img { width: 48px; height: 48px; }
}

/* -------------------------------------------------------------------
 * Judge Export: "Print" and "Save as PDF" buttons both call
 * window.print() (the browser's own Print dialog lets the user choose
 * a physical printer OR "Save as PDF" as the destination — there's no
 * other way to generate a PDF without a heavy server-side PDF-rendering
 * dependency). The .bce-print-only report header below and the page
 * setup/typography rules in @media print are what turn this into an
 * organized document rather than a screenshot of the on-screen page.
 * ------------------------------------------------------------------- */
.bce-print-only { display: none; }

@media print {
	@page {
		size: A4;
		margin: 12mm 12mm;
	}

	.bce-print-hide,
	.bce-export-buttons,
	#wpadminbar,
	.bce-delete-link,
	nav,
	header,
	footer {
		display: none !important;
	}

	/* Third-party floating widgets (live chat buttons, WhatsApp/Messenger
	   buttons, cookie banners, etc.) — these are virtually always
	   position:fixed to stay visible while scrolling, and injected by a
	   separate plugin, not part of this report's content. The exact
	   tool in use isn't known, so this targets common naming patterns
	   across popular chat tools rather than one specific selector. */
	div[class*="chat-widget" i],
	div[id*="chat-widget" i],
	div[class*="tawk" i],
	div[id*="tawk" i],
	div[class*="crisp" i],
	div[id*="crisp" i],
	div[class*="intercom" i],
	div[id*="intercom" i],
	div[class*="livechat" i],
	div[id*="livechat" i],
	div[class*="whatsapp-chat" i],
	div[id*="whatsapp-chat" i],
	iframe[title*="chat" i],
	iframe[title*="Intercom" i],
	[style*="position: fixed"],
	[style*="position:fixed"] {
		display: none !important;
	}

	body { color: #1a1a1a; background: #fff; font-size: 11pt; line-height: 1.5; font-family: 'Quicksand', -apple-system, sans-serif; }

	.bce-view-wrap {
		width: 100% !important;
		max-width: 100% !important;
	}

	/* The on-screen competition-title heading is redundant once the
	   print-only report header (below) is shown — avoid showing the
	   same title twice. */
	.bce-view-header-row h3 { display: none; }

	.bce-print-only { display: block; }

	.bce-print-report-header {
		margin-bottom: 28px;
		padding-bottom: 18px;
		border-bottom: 3px solid #1a1a1a;
	}
	.bce-print-report-brand {
		font-size: 10pt;
		text-transform: uppercase;
		letter-spacing: 1.5px;
		color: #555;
		margin-bottom: 6px;
	}
	.bce-print-report-header h1 {
		font-family: 'Quicksand', -apple-system, sans-serif; font-weight: 600;
		font-size: 22pt;
		margin: 0 0 16px;
	}
	.bce-print-report-meta { width: 100%; border-collapse: collapse; font-size: 10pt; }
	.bce-print-report-meta th {
		text-align: left;
		width: 160px;
		padding: 4px 12px 4px 0;
		color: #555;
		font-weight: 600;
		vertical-align: top;
	}
	.bce-print-report-meta td { padding: 4px 0; vertical-align: top; }

	/* Section headings get a consistent report-style treatment and a
	   subtle rule beneath them, instead of the on-screen admin-style h4. */
	.bce-view-wrap h4 {
		font-family: 'Quicksand', -apple-system, sans-serif; font-weight: 600;
		font-size: 14pt;
		margin: 24px 0 10px;
		padding-bottom: 4px;
		border-bottom: 1px solid #ccc;
	}

	/* Force a fresh page before clearly-distinct report sections instead
		of letting them run together wherever they happen to land — this
		is the core of what makes the output feel like an organized
		document rather than a raw capture of the on-screen page. */
	.bce-print-section-start {
		break-before: page;
		page-break-before: always;
	}

	/* Tables: on-screen borders are deliberately faint; make them solid
	   and legible on paper. Long values (URLs, long text) must wrap
	   instead of overflowing the printable page width. */
	.bce-frontend-table,
	.bce-print-report-meta { border-collapse: collapse; }
	.bce-frontend-table th,
	.bce-frontend-table td {
		border: 1px solid #999 !important;
		padding: 6px 10px !important;
		overflow-wrap: break-word;
		word-break: break-word;
	}
	.bce-frontend-table th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

	/* The Submitted Data table's label column has an inline
	   style="width:220px" sized for a wide screen — far too wide a
	   fraction of a printable A4 page, crowding the value column. A
	   fixed, more moderate width reads better on paper. */
	.bce-print-submitted-data { table-layout: fixed; width: 100%; }
	.bce-print-submitted-data th[style] { width: 140px !important; }

	/* Student Work entries: the on-screen flex-wrap grid of fixed-width
	   (260px) cards doesn't paginate predictably — a card can be sliced
	   in half across a page break, or leave an awkward half-empty row.
	   A single stacked column reads cleanly top-to-bottom regardless of
	   how many entries or how content-heavy each one is. */
	.bce-repeater-view-grid {
		display: block;
	}
	.bce-repeater-view-card {
		display: block;
		width: 100% !important;
		margin-bottom: 16px;
		break-inside: avoid;
		page-break-inside: avoid;
		border: 1px solid #ccc !important;
	}
	.bce-repeater-view-media { display: block; }
	.bce-repeater-view-thumb,
	.bce-attachment-thumb { max-height: 220px; max-width: 100%; }
	.bce-repeater-view-details p,
	.bce-repeater-view-links { overflow-wrap: break-word; word-break: break-word; }

	/* Info/alert boxes (e.g. the "COVER ART" note): keep a visible
	   border and dark text unconditionally, so the box stays legible
	   even on a grayscale printer that won't reproduce the light-blue
	   background — the background itself is a bonus if color printing
	   is used, never the only thing carrying the content's visibility. */
	.bce-block-alert,
	.bce-repeater-alert {
		border: 1px solid #888 !important;
		color: #1a1a1a !important;
		break-inside: avoid;
		page-break-inside: avoid;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	/* Attachment cards: same intact-on-one-page + no-overflow treatment
	   as Student Work cards. */
	.bce-attachment-card {
		break-inside: avoid;
		page-break-inside: avoid;
		border: 1px solid #ccc !important;
	}

	.bce-judge-feedback {
		break-inside: avoid;
		page-break-inside: avoid;
		border: 1px solid #ccc !important;
		background: #f8f9fa !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.bce-status {
		border: 1px solid #999 !important;
		background: #fff !important;
		color: #1a1a1a !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	a[href]:after { content: ""; }
}
