/**
 * NU Result Checker — front-end styles.
 *
 * Every rule is namespaced under .nurc-wrap so the plugin cannot leak styles
 * into the surrounding theme. The per-tab accent colour arrives as the
 * --nurc-accent custom property, set inline on each tab button and panel.
 */

.nurc-wrap {
	--nurc-accent: #1e8449;
	--nurc-border: #e2e6ea;
	--nurc-muted: #6b7280;
	--nurc-radius: 10px;
	--nurc-shadow: 0 1px 3px rgba(16, 24, 40, .08), 0 8px 24px rgba(16, 24, 40, .06);

	box-sizing: border-box;
	max-width: 980px;
	margin: 0 auto;
	font-size: 16px;
	line-height: 1.5;
}

.nurc-wrap *,
.nurc-wrap *::before,
.nurc-wrap *::after {
	box-sizing: inherit;
}

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

/*
 * Each tab is two blocks: the label on a shared blue (--nurc-tab-base) and a
 * chevron in that tab's own colour (--nurc-accent). The shared base is what stops
 * six different colours reading as chaos, while the chevron still tells you at a
 * glance which programme you are on.
 */

.nurc-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 18px;
}

.nurc-tab-btn {
	display: inline-flex;
	align-items: stretch;
	/* No grow, no shrink: the tab is as wide as its label needs and the row wraps
	   when it runs out of space. Never narrower than its text. */
	flex: 0 0 auto;
	max-width: 100%;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: none;
	font-family: inherit;
	cursor: pointer;
	overflow: hidden;
	transition: transform .12s ease, box-shadow .12s ease;
}

.nurc-tab-label {
	display: flex;
	align-items: center;
	padding: 11px 16px;
	/* One line on desktop. The row wraps; the words do not break. */
	white-space: nowrap;
	background: var(--nurc-tab-base, #1276cc);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.25;
	text-align: left;
}

.nurc-tab-arrow {
	display: flex;
	flex: 0 0 40px;
	align-items: center;
	justify-content: center;
	background: var(--nurc-accent);
}

/* Chevron drawn as a background image so it does not depend on a glyph being
   present in the theme's font. */
.nurc-tab-arrow::before {
	content: "";
	width: 11px;
	height: 18px;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'%3E%3Cpath d='M2 1l8 9-8 9' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 20'%3E%3Cpath d='M2 1l8 9-8 9' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

.nurc-tab-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 3px 8px rgba(16, 24, 40, .18);
}

/* The selected tab takes its own colour across the whole button, which ties it
   to the 2px panel border below it. */
.nurc-tab-btn.active .nurc-tab-label {
	background: var(--nurc-accent);
}

.nurc-tab-btn.active {
	box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25);
}

.nurc-tab-btn:focus-visible {
	outline: 3px solid #111827;
	outline-offset: 2px;
}

.nurc-badge-new {
	display: inline-block;
	margin-left: 6px;
	padding: 1px 6px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	vertical-align: middle;
}

/* -------------------------------------------------------------- Panels -- */

.nurc-panel {
	display: none;
}

.nurc-panel.active {
	display: block;
}

.nurc-card {
	padding: 24px;
	/* 2px, in the tab's own colour, so the panel reads as belonging to the tab
	   above it rather than floating loose on the page. */
	border: 2px solid var(--nurc-accent);
	border-radius: var(--nurc-radius);
	background: #fff;
	box-shadow: var(--nurc-shadow);
}

.nurc-heading {
	margin: 0 0 20px;
	color: var(--nurc-accent);
	filter: saturate(1.05);
	font-size: 20px;
	font-weight: 700;
	line-height: 1.3;
}

/* --------------------------------------------------------------- Form -- */

.nurc-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.nurc-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.nurc-field label {
	margin-bottom: 6px;
	color: #374151;
	font-size: 13px;
	font-weight: 600;
}

.nurc-field select,
.nurc-field input {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #fff;
	color: #111827;
	font-size: 15px;
	font-family: inherit;
	transition: border-color .15s ease, box-shadow .15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.nurc-field select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.5 7.5L10 12l4.5-4.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 18px;
	padding-right: 34px;
}

.nurc-field select:focus,
.nurc-field input:focus {
	border-color: var(--nurc-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--nurc-accent) 18%, transparent);
	outline: none;
}

.nurc-field select:disabled {
	background-color: #f3f4f6;
	color: var(--nurc-muted);
	cursor: not-allowed;
}

.nurc-field input.nurc-invalid,
.nurc-field select.nurc-invalid {
	border-color: #dc2626;
}

.nurc-field-error {
	margin-top: 4px;
	color: #dc2626;
	font-size: 12px;
}

/* Hide the number-input spinners: exam year is never nudged one at a time. */
.nurc-field input[type="number"]::-webkit-outer-spin-button,
.nurc-field input[type="number"]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.nurc-field input[type="number"] {
	-moz-appearance: textfield;
}

.nurc-submit-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
}

.nurc-submit-btn,
.nurc-reset-btn {
	padding: 12px 26px;
	border-radius: 8px;
	font-size: 15px;
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s ease, background .15s ease;
}

.nurc-submit-btn {
	border: 1px solid var(--nurc-accent);
	background: var(--nurc-accent);
	color: #fff;
}

.nurc-submit-btn:hover:not(:disabled) {
	opacity: .9;
}

.nurc-submit-btn:disabled {
	opacity: .6;
	cursor: progress;
}

.nurc-reset-btn {
	border: 1px solid var(--nurc-accent);
	background: transparent;
	color: var(--nurc-accent);
}

.nurc-reset-btn[hidden] {
	display: none;
}

/* --------------------------------------------------------- Assurance -- */

/*
 * Sits under the form, deliberately not under the result: it is there to answer
 * "is it safe to type my registration number here" before the visitor types it.
 */
.nurc-assurance {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 7px;
	max-width: 620px;
	margin: 14px auto 0;
	color: var(--nurc-muted);
	font-size: 13px;
	line-height: 1.45;
	text-align: center;
}

.nurc-assurance a {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: color-mix(in srgb, currentColor 45%, transparent);
	text-underline-offset: 2px;
}

.nurc-assurance a:hover {
	color: var(--nurc-accent);
	text-decoration-color: currentColor;
}

.nurc-assurance-icon {
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	margin-top: 2px;
	background: #16a34a;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.4 9.3-8 11-4.6-1.7-8-6-8-11V5l8-3z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l8 3v6c0 5-3.4 9.3-8 11-4.6-1.7-8-6-8-11V5l8-3z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M8.5 12l2.5 2.5 4.5-5' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* ------------------------------------------------------------- Result -- */

.nurc-result:empty {
	display: none;
}

.nurc-result {
	margin-top: 22px;
}

.nurc-message {
	padding: 14px 16px;
	border-radius: 8px;
	font-size: 15px;
	text-align: center;
}

.nurc-message.loading {
	border: 1px solid var(--nurc-border);
	background: #f9fafb;
	color: var(--nurc-muted);
}

.nurc-message.error {
	border: 1px solid #fecaca;
	background: #fef2f2;
	color: #b91c1c;
}

.nurc-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-right: 8px;
	border: 2px solid #d1d5db;
	border-top-color: var(--nurc-accent);
	border-radius: 50%;
	vertical-align: -2px;
	animation: nurc-spin .7s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
	.nurc-spinner { animation-duration: 2s; }
}

/*
 * Result sheet.
 *
 * Rebuilt to match National University's own online result sheet. Their page is
 * Bootstrap 5; these rules reproduce the same layout with scoped CSS so the
 * theme never has to load Bootstrap and cannot collide with it.
 */

.nurc-sheet {
	--nurc-nu-blue: #1276cc;
	--nurc-nu-navy: #0d3b66;

	border-radius: 14px;
	background: #fff;
	box-shadow: 0 1px 3px rgba(16, 24, 40, .1), 0 12px 32px rgba(16, 24, 40, .08);
	overflow: hidden;
}

.nurc-sheet-head {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 22px 24px;
	border-bottom: 3px solid var(--nurc-nu-blue);
	background: #fff;
}

.nurc-sheet-logo img {
	display: block;
	width: 70px;
	height: auto;
}

.nurc-sheet-titles {
	min-width: 0;
}

.nurc-sheet-titles h3,
.nurc-sheet-titles h4 {
	margin: 0 0 4px;
	color: var(--nurc-nu-navy);
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .3px;
	line-height: 1.25;
}

.nurc-sheet-titles p {
	margin: 0 0 8px;
	color: var(--nurc-muted);
	font-size: 13px;
	font-weight: 600;
}

.nurc-sheet-badge {
	display: inline-block;
	padding: 6px 14px;
	border: 1px solid var(--nurc-nu-blue);
	border-radius: 999px;
	background: #eaf4ff;
	color: var(--nurc-nu-blue);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .5px;
}

.nurc-sheet-body {
	padding: 24px;
}

/* Twelve-column grid, mirroring NU's Bootstrap column widths. */
.nurc-fields {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 22px;
}

.nurc-field-block {
	padding: 12px 14px;
	border-radius: 10px;
	background: #f6f7f9;
	min-width: 0;
}

.nurc-span-4  { grid-column: span 4; }
.nurc-span-6  { grid-column: span 6; }
.nurc-span-8  { grid-column: span 8; }
.nurc-span-12 { grid-column: span 12; }

.nurc-field-label {
	display: block;
	margin-bottom: 2px;
	color: var(--nurc-muted);
	font-size: 12px;
}

.nurc-field-value {
	display: block;
	color: #111827;
	font-size: 15px;
	font-weight: 600;
	word-break: break-word;
}

.nurc-field-value.nurc-strong {
	font-weight: 700;
}

/* Registration number, printed one digit per box as NU does. */
.nurc-digits {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-top: 4px;
}

.nurc-digit {
	min-width: 26px;
	padding: 3px 7px;
	border: 1px solid var(--nurc-nu-blue);
	border-radius: 5px;
	background: #fff;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

/* Result / GPA panel. */
.nurc-summary-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 24px;
}

.nurc-summary {
	display: inline-flex;
	border: 1px solid #e6eaef;
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
	overflow: hidden;
}

.nurc-summary-cell {
	padding: 14px 44px;
	background: #fff;
	text-align: center;
}

.nurc-summary-cell + .nurc-summary-cell {
	border-left: 1px dashed #d8dee6;
}

.nurc-summary-label {
	margin-bottom: 4px;
	color: #8a93a0;
	font-size: 10.5px;
	font-weight: 600;
	letter-spacing: .6px;
	text-transform: uppercase;
}

.nurc-summary-value {
	color: #12213a;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
}

.nurc-summary-result.nurc-tone-pass {
	background: #f4faf6;
}

.nurc-summary-result.nurc-tone-pass .nurc-summary-label {
	color: #1a8a4a;
}

.nurc-summary-result.nurc-tone-pass .nurc-summary-value {
	color: #14703c;
}

.nurc-summary-result.nurc-tone-fail {
	background: #fef4f4;
}

.nurc-summary-result.nurc-tone-fail .nurc-summary-label {
	color: #b42318;
}

.nurc-summary-result.nurc-tone-fail .nurc-summary-value {
	color: #912018;
}

/* Coursewise table. */
.nurc-table-heading {
	margin: 0 0 12px;
	color: var(--nurc-nu-blue);
	font-size: 15px;
	font-weight: 600;
}

.nurc-table-scroll {
	margin-bottom: 22px;
	overflow-x: auto;
}

.nurc-subjects {
	width: 100%;
	border-collapse: collapse;
	font-size: 13.5px;
}

.nurc-subjects th,
.nurc-subjects td {
	padding: 9px 12px;
	border: 1px solid #dfe3e8;
	vertical-align: middle;
}

.nurc-subjects thead th {
	background: #cfe2ff;
	color: #0b3a75;
	font-weight: 700;
	text-align: center;
}

.nurc-subjects tbody tr:nth-child(odd) {
	background: #f8f9fa;
}

.nurc-subjects tbody tr:hover {
	background: #eef2f6;
}

.nurc-cell-center {
	text-align: center;
	font-weight: 600;
}

.nurc-cell-title {
	text-align: left;
	font-weight: 400;
}

/* QR + signature strip. */
.nurc-sheet-sign {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-top: 8px;
}

.nurc-sheet-qr img {
	display: block;
	width: 80px;
	height: 80px;
}

.nurc-sheet-signature {
	padding: 0 16px;
	text-align: center;
}

.nurc-sign-sd {
	color: var(--nurc-muted);
	font-size: 12px;
}

.nurc-sign-name {
	font-size: 13px;
	font-weight: 700;
}

.nurc-sign-org {
	color: var(--nurc-muted);
	font-size: 12px;
	font-weight: 700;
}

.nurc-sheet-foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	padding: 14px 24px;
	border-top: 1px solid var(--nurc-border);
	background: #f8f9fa;
	color: var(--nurc-muted);
	font-size: 12.5px;
}

.nurc-result-actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-top: 18px;
}

.nurc-action-btn {
	padding: 10px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--nurc-accent);
	color: #fff;
	font-size: 14px;
	font-family: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s ease;
}

.nurc-action-btn:hover {
	opacity: .9;
}

/* -------------------------------------------------------- Provenance -- */

/*
 * The sheet above deliberately mimics NU's official layout, so this notice is
 * the only thing distinguishing it from the real one. It is styled to be read,
 * not skipped: full width, its own border, and left in place when printing.
 */
.nurc-provenance {
	margin-top: 16px;
	padding: 12px 16px;
	border: 1px solid #fde68a;
	border-left: 4px solid #f59e0b;
	border-radius: 8px;
	background: #fffbeb;
}

.nurc-provenance-main {
	margin: 0;
	color: #713f12;
	font-size: 13.5px;
	line-height: 1.5;
}

.nurc-provenance-meta {
	margin: 6px 0 0;
	color: #854d0e;
	font-size: 12px;
}

.nurc-provenance-meta a {
	color: #854d0e;
	font-weight: 600;
	text-decoration: underline;
}

.nurc-provenance-sep {
	margin: 0 6px;
	opacity: .6;
}

/* --------------------------------------------------------------- FAQ -- */

.nurc-faq {
	margin-top: 28px;
}

.nurc-faq-heading {
	margin: 0 0 12px;
	color: #111827;
	font-size: 19px;
	font-weight: 700;
}

.nurc-faq-item {
	border: 1px solid var(--nurc-border);
	border-radius: 8px;
	background: #fff;
	margin-bottom: 8px;
}

.nurc-faq-item summary {
	padding: 12px 16px;
	color: #111827;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
}

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

.nurc-faq-item summary::after {
	content: "+";
	float: right;
	color: var(--nurc-accent);
	font-size: 18px;
	line-height: 1;
}

.nurc-faq-item[open] summary::after {
	content: "\2212";
}

.nurc-faq-item summary:focus-visible {
	outline: 2px solid var(--nurc-accent);
	outline-offset: -2px;
}

.nurc-faq-item p {
	margin: 0;
	padding: 0 16px 14px;
	color: #374151;
	font-size: 14px;
	line-height: 1.6;
}

/* ------------------------------------------------------------ Mobile -- */

@media (max-width: 640px) {
	.nurc-card {
		padding: 18px 14px;
	}

	.nurc-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.nurc-tabs {
		gap: 8px;
	}

	.nurc-tab-btn {
		flex: 1 1 calc(50% - 4px);
		min-width: 0;
	}

	.nurc-tab-label {
		flex: 1 1 auto;
		min-width: 0;
		padding: 9px 10px;
		font-size: 12.5px;
		line-height: 1.2;
		/* Narrow screens get wrapping labels instead of a clipped single line. */
		white-space: normal;
	}

	.nurc-tab-arrow {
		flex: 0 0 26px;
	}

	.nurc-tab-arrow::before {
		width: 9px;
		height: 14px;
	}

	.nurc-submit-btn,
	.nurc-reset-btn {
		flex: 1 1 100%;
	}

	.nurc-sheet-head {
		flex-direction: column;
		gap: 10px;
		text-align: center;
	}

	.nurc-sheet-body {
		padding: 18px 14px;
	}

	/* Every field goes full width once the grid would otherwise squash. */
	.nurc-span-4,
	.nurc-span-6,
	.nurc-span-8,
	.nurc-span-12 {
		grid-column: span 12;
	}

	.nurc-summary {
		width: 100%;
	}

	.nurc-summary-cell {
		flex: 1 1 0;
		padding: 14px 16px;
	}

	.nurc-sheet-sign {
		flex-direction: column;
		align-items: center;
		gap: 12px;
	}

	.nurc-sheet-foot {
		justify-content: center;
		padding: 14px;
		text-align: center;
	}

	.nurc-subjects th,
	.nurc-subjects td {
		padding: 8px 10px;
	}
}

/* -------------------------------------------------------------- Print -- */

/*
 * The result sheet is cloned into #nurc-print-area (a direct child of <body>)
 * immediately before window.print(), and body gets .nurc-printing.
 *
 * Everything else is removed with `display: none` rather than `visibility:
 * hidden`. Hidden-but-present content still occupies its full height, so the
 * browser keeps paginating past the result and emits a stack of blank pages —
 * display:none takes it out of flow entirely and the document ends where the
 * result ends.
 *
 * --nurc-print-scale is measured in JS and shrinks a long result until it fits
 * a single sheet. The width divides by the same factor so the scaled result
 * still fills the page rather than hugging the left margin.
 */
#nurc-print-area {
	display: none;
}

/*
 * Compaction for the printed sheet.
 *
 * These deliberately live OUTSIDE @media print. The print container is cloned
 * and measured off-screen to decide how much the sheet must shrink to fit one
 * page, and a screen-only measurement of print-only styles would read the
 * roomier on-screen padding and font sizes — over-estimating the height every
 * time and shrinking results that would have fitted at full size. The container
 * is display:none except while measuring or printing, so scoping these to it is
 * safe.
 */
/* Tighten the layout so a typical result needs no scaling at all. */
#nurc-print-area .nurc-sheet-head {
	padding: 12px 16px;
}

#nurc-print-area .nurc-sheet-body {
	padding: 14px 16px;
}

#nurc-print-area .nurc-fields {
	gap: 8px;
	margin-bottom: 12px;
}

#nurc-print-area .nurc-field-block {
	padding: 7px 10px;
}

#nurc-print-area .nurc-field-label {
	font-size: 10.5px;
}

#nurc-print-area .nurc-field-value {
	font-size: 13px;
}

#nurc-print-area .nurc-digit {
	min-width: 20px;
	padding: 1px 4px;
	font-size: 11px;
}

#nurc-print-area .nurc-summary-wrap {
	margin-bottom: 12px;
}

#nurc-print-area .nurc-summary-cell {
	padding: 8px 28px;
}

#nurc-print-area .nurc-summary-value {
	font-size: 18px;
}

#nurc-print-area .nurc-table-heading {
	margin-bottom: 8px;
	font-size: 13px;
}

#nurc-print-area .nurc-table-scroll {
	margin-bottom: 12px;
	overflow: visible;
}

#nurc-print-area .nurc-subjects {
	font-size: 11.5px;
}

#nurc-print-area .nurc-subjects th,
#nurc-print-area .nurc-subjects td {
	padding: 5px 8px;
}

#nurc-print-area .nurc-sheet-qr img {
	width: 64px;
	height: 64px;
}

#nurc-print-area .nurc-sheet-foot {
	padding: 8px 16px;
	font-size: 11px;
}


@media print {
	html,
	body.nurc-printing {
		height: auto !important;
		min-height: 0 !important;
		max-height: none !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: visible !important;
		background: #fff !important;
	}

	/* Remove the theme, the form and everything else from the page. */
	body.nurc-printing > *:not(#nurc-print-area) {
		display: none !important;
	}

	body.nurc-printing #nurc-print-area {
		display: block !important;
		position: static !important;
		/* Plain 100%, with no compensation for the zoom below. A zoomed element
		   resolves percentage widths against the zoomed containing block, so it
		   already fills the page; dividing the width by the scale as well makes
		   the sheet ~1.5x too wide and the grade column gets clipped by the
		   card's overflow. */
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0;
		/* `zoom`, not `transform: scale()`. A transform is applied after layout,
		   so Chromium still paginates on the original box height and a "scaled"
		   sheet spills onto page two anyway. zoom changes the layout itself, so
		   pagination follows the shrunk size. */
		zoom: var(--nurc-print-scale, 1);
	}

	#nurc-print-area .nurc-provenance {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		page-break-inside: avoid;
	}

	/* Interactive furniture never belongs on paper. */
	#nurc-print-area .nurc-result-actions,
	#nurc-print-area .nurc-submit-row,
	#nurc-print-area .nurc-tabs {
		display: none !important;
	}

	#nurc-print-area .nurc-sheet {
		border: 1px solid #999;
		border-radius: 0;
		box-shadow: none;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* Browsers drop background colours on paper unless told otherwise, which
	   would flatten the table header, tinted blocks and result panel to white. */
	#nurc-print-area .nurc-field-block,
	#nurc-print-area .nurc-summary-cell,
	#nurc-print-area .nurc-sheet-badge,
	#nurc-print-area .nurc-digit,
	#nurc-print-area .nurc-subjects thead th,
	#nurc-print-area .nurc-subjects tbody tr:nth-child(odd),
	#nurc-print-area .nurc-sheet-foot {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	#nurc-print-area .nurc-subjects tbody tr:hover {
		background: transparent;
	}

	#nurc-print-area tr,
	#nurc-print-area .nurc-summary,
	#nurc-print-area .nurc-sheet-sign {
		page-break-inside: avoid;
		break-inside: avoid;
	}

	@page {
		size: A4 portrait;
		margin: 10mm;
	}
}
