/* ==========================================================================
   Agrivencia — print
   Loaded with media="print", so every rule here applies on paper only.

   This sheet is not an afterthought. Scheme guides, evidence checklists,
   compliance calendars and payment schedules get printed and taken to a
   kitchen table, a bank meeting or an assurance audit, and a page that
   prints badly is a page that does not get used. So: black on white, the
   URL behind every link spelled out, tables that break at row boundaries,
   and nothing carried over from the screen that costs ink without adding
   information.
   ========================================================================== */

/* --- Page setup ----------------------------------------------------- */

@page {
	size: A4;
	margin: 16mm 14mm 18mm;
}

@page :first {
	margin-top: 12mm;
}

/* --- Ground --------------------------------------------------------- */

html,
body {
	background: #fff !important;
	color: #000 !important;
	font-size: 10.5pt;
	line-height: 1.45;
}

/* Painted sections cost a fortune in ink and print as grey mud. Every tone
   flattens to white with the type set in black. */
.agv-tone--light,
.agv-tone--tint,
.agv-tone--deep,
.agv-tone--colour,
.agv-section,
.agv-surface,
.agv-panel,
.agv-card,
.agv-callout {
	background: #fff !important;
	color: #000 !important;
	box-shadow: none !important;
}

.agv-tone--deep *,
.agv-tone--colour * { color: #000 !important; }

.agv-shell { display: block; }

/* --- What comes off the page --------------------------------------- */

/* Navigation, controls and anything that only exists to be clicked. */
.agv-cockpit,
.agv-megamenu,
.agv-panel--megamenu,
.agv-mobile-nav,
.agv-nav-toggle,
.agv-floating,
.agv-float,
.agv-skip,
.agv-search,
.agv-typeahead,
.agv-lightbox,
.agv-crumbs,
.agv-footer__widgets,
.agv-newsletter,
.agv-filters,
.agv-save,
.agv-media__zoomicon,
.agv-player__play,
.agv-player__glyph,
.agv-dash__views,
.agv-dash__tablist,
.agv-cal__actions,
.agv-trace__copy,
.agv-status__copy,
.agv-elig__actions,
.agv-results__form,
.agv-finder__go,
[data-agv-play],
[data-agv-copy],
[data-agv-save],
[data-agv-calendar="ics"],
button[type="submit"],
input[type="submit"] {
	display: none !important;
}

/* The account and marketing closers have no purpose on paper. */
.agv-section--cta-band,
.agv-section--newsletter,
.agv-section--leadgen,
.agv-section--guide-download,
.agv-section--pricing,
.agv-section--testimonials { display: none !important; }

/* A form on paper is a form to fill in by hand, so the fields stay — but
   only where the section is a real record, not a lead capture. */
.agv-section--steps-form input,
.agv-section--contact-form input,
.agv-section--eligibility input {
	border: 0 !important;
	border-bottom: 1pt solid #000 !important;
	border-radius: 0 !important;
	background: none !important;
	min-height: 7mm;
}

/* --- Media ---------------------------------------------------------- */

/* A real photograph prints; an unfilled slot prints as a labelled box so
   the reader knows a picture belongs there rather than seeing a grey slab. */
.agv-media--real { break-inside: avoid; }
.agv-media--real img { max-width: 100% !important; }

.agv-media--slot {
	border: 1pt dashed #999 !important;
	background: none !important;
	min-height: 24mm;
}
.agv-media--slot .agv-media__wash,
.agv-media--slot .agv-media__grid,
.agv-media--slot .agv-media__mark { display: none !important; }
.agv-media--slot .agv-media__brief {
	color: #666 !important;
	font-size: 8pt;
}
.agv-media--slot .agv-media__badge {
	background: none !important;
	box-shadow: none !important;
	color: #666 !important;
}

/* Decorative hero and map washes are pure cost. */
.agv-hero__media,
.agv-hero__bg,
.agv-hero__grain,
.agv-hero__field,
.agv-mapsec__media { display: none !important; }

.agv-player__stage { border: 1pt solid #ccc; }
.agv-player__meta::after { content: " — watch at the URL above."; }

/* --- Links ---------------------------------------------------------- */

a { color: #000 !important; text-decoration: underline; }

/* Spell out the destination, because a printed link is useless otherwise.
   Internal anchors, and links whose text already is the URL, are skipped. */
.agv-main a[href^="http"]::after {
	content: " (" attr(href) ")";
	font-size: 8pt;
	font-family: var(--agv-mono);
	word-break: break-all;
	color: #444;
}

.agv-main a[href^="#"]::after,
.agv-main a[href^="mailto"]::after,
.agv-btn::after,
.agv-typeahead a::after { content: "" !important; }

/* --- Structure ------------------------------------------------------ */

.agv-wrap {
	max-width: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

.agv-section,
.agv-surface {
	padding-block: 6mm !important;
	border-top: 1pt solid #ddd;
	break-inside: auto;
}

.agv-section:first-of-type { border-top: 0; }

h1, h2, h3, h4 {
	break-after: avoid;
	page-break-after: avoid;
	color: #000 !important;
}

h1 { font-size: 20pt; line-height: 1.15; }
h2 { font-size: 14pt; margin-top: 6mm; }
h3 { font-size: 11.5pt; }

p, li, dd { orphans: 3; widows: 3; }

/* Grids collapse: two columns of body text on A4 is unreadable at 10.5pt. */
.agv-grid,
.agv-grid--2,
.agv-grid--3,
.agv-grid--4,
.agv-dash__panels,
.agv-shopfront__cats,
.agv-docs__grid,
.agv-booking__options,
.agv-account__idgrid,
.agv-vendor__panels {
	display: block !important;
}

.agv-grid > *,
.agv-dash__panels > * { margin-bottom: 4mm; break-inside: avoid; }

.agv-product__split,
.agv-video__grid,
.agv-hero__grid,
.agv-vendor__body { display: block !important; }

/* --- Tables --------------------------------------------------------- */

/* The ledger, the market board and the jobs table are the whole reason
   someone printed the page. They must not scroll, must not clip, and must
   repeat their header on every sheet. */
.agv-scroll {
	overflow: visible !important;
	max-width: none !important;
}

.agv-table,
table {
	width: 100% !important;
	border-collapse: collapse !important;
	font-size: 9pt;
	break-inside: auto;
}

.agv-table thead,
table thead { display: table-header-group; }

.agv-table tfoot,
table tfoot { display: table-footer-group; }

.agv-table tr,
table tr { break-inside: avoid; page-break-inside: avoid; }

.agv-table th,
.agv-table td,
table th,
table td {
	border: 1pt solid #bbb !important;
	padding: 1.6mm 2mm !important;
	background: none !important;
	color: #000 !important;
	text-align: left;
}

.agv-table th,
table th { font-weight: 700; background: #f2f2f2 !important; }

.agv-num,
.agv-table__numhead { text-align: right !important; }

/* Sticky row headers are a screen affordance; on paper they misalign. */
.agv-table tbody th[scope="row"] { position: static !important; }

/* --- State, without colour ------------------------------------------ */

/* Every state on screen is carried by colour and a pill. On paper the pill
   flattens, so the meaning moves into the text. */
.agv-pill--state,
.agv-badge,
.agv-chip {
	border: 1pt solid #666 !important;
	background: none !important;
	color: #000 !important;
	padding: .3mm 1.2mm !important;
	font-size: 8pt;
}

.agv-badge--sample::after { content: " data"; }

/* Sparklines and quartile bars carry a shape, which does survive — but the
   fill does not, so drop it and keep the line. */
.agv-spark { color: #000 !important; }
.agv-spark__area { display: none !important; }
.agv-spark__line,
.agv-spark__dot { stroke: #000 !important; fill: #000 !important; }

.agv-quart__track,
.agv-quart__box { background: none !important; border: 1pt solid #999 !important; }
.agv-quart__median,
.agv-quart__you { background: #000 !important; }

.agv-delta--good::after { content: " (up)"; font-size: 8pt; }
.agv-delta--bad::after,
.agv-delta--down::after { content: " (down)"; font-size: 8pt; }

/* --- The chain and the track ---------------------------------------- */

/* Both are ordered lists whose markers carry the state. Numbers print; the
   drawn connectors and fills do not, so the state is spelled out. */
.agv-track__connector,
.agv-trace__connector { display: none !important; }

.agv-track__step,
.agv-trace__step {
	break-inside: avoid;
	padding-left: 0 !important;
	margin-bottom: 3mm;
}

.agv-track__marker { border: 1pt solid #000 !important; background: none !important; }
.agv-track__step--done .agv-track__label::after { content: " — complete"; font-size: 8pt; }
.agv-track__step--current .agv-track__label::after { content: " — current stage"; font-size: 8pt; }
.agv-track__step--waiting .agv-track__label::after { content: " — not started"; font-size: 8pt; }

/* --- The calendar --------------------------------------------------- */

.agv-cal__month { break-inside: avoid; break-after: auto; }
.agv-cal__item { break-inside: avoid; margin-bottom: 2mm; }
.agv-cal__date { border: 1pt solid #000 !important; background: none !important; color: #000 !important; }
.agv-cal__legend { border: 1pt solid #ccc; padding: 2mm; }

/* --- Notes and caveats ---------------------------------------------- */

/* The provenance notes are the most important thing on the page when it is
   read away from the platform, so they gain weight rather than losing it. */
.agv-note,
.agv-surface__note,
.agv-evidence-note {
	border: 1pt solid #000 !important;
	border-left-width: 2.5pt !important;
	background: none !important;
	color: #000 !important;
	padding: 2.5mm 3mm !important;
	font-size: 9pt;
	break-inside: avoid;
}

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

/* Anyone reading this on paper needs to know where it came from and when,
   because scheme rules move. */
.agv-main::after {
	content: "Printed from Agrivencia. Payment rates, scheme windows and compliance obligations change — verify against the publishing body before relying on any figure here.";
	display: block;
	margin-top: 8mm;
	padding-top: 3mm;
	border-top: 1pt solid #000;
	font-size: 8pt;
	line-height: 1.4;
	color: #333;
}

/* --- Utilities ------------------------------------------------------ */

.screen-reader-text { position: static !important; clip-path: none !important; width: auto !important; height: auto !important; }

details { break-inside: avoid; }
details > summary { list-style: none; font-weight: 700; }
details:not([open]) > *:not(summary) { display: revert !important; }
details[open] > summary::marker,
details > summary::marker { content: ""; }

/* Anything explicitly marked as screen-only. */
[data-print="hide"], .agv-no-print { display: none !important; }
[data-print="only"] { display: revert !important; }
