/* ==========================================================================
   Agritech white papers -- long-form reading layout + print styles.
   Loaded after main.css and agritech.css.
   ========================================================================== */

/* Reading typography: a system UI stack is wider and more legible for
   long-form text than the condensed brand font, and needs no download. */
.wp-hero, .wp-layout {
	--read-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
	--read-text: #1f2a37;
	--read-muted: #4b5563;
	font-family: var(--read-font);
}
.wp-hero h1, .wp-hero h2, .wp-layout h2, .wp-layout h3, .wp-layout h4 { font-family: var(--read-font); letter-spacing: -0.01em; }

.wp-hero { background: var(--agri-gradient); color: #e6f4ec; padding: 72px 0 64px; }
.wp-hero .eyebrow { color: #a7f3c9; font-size: 14px; letter-spacing: .06em; }
.wp-hero h1 { color: #fff; font-size: 42px; line-height: 1.2; font-weight: 700; max-width: 880px; margin-bottom: 18px; }
.wp-hero .wp-subtitle { font-size: 20px; line-height: 1.6; max-width: 760px; color: #e6f4ec; }
.wp-meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; font-size: 15px; color: #e6f4ec; }
.wp-meta-row span { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); border-radius: 50px; padding: 6px 14px; }
.wp-meta-row strong { color: #fff; font-weight: 600; }
.wp-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.wp-actions .btn { font-family: inherit; font-size: 16px; line-height: 1.4; }

.wp-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
.wp-toc { position: sticky; top: 100px; font-size: 15px; line-height: 1.5; border-left: 2px solid var(--border-color); padding-left: 18px; }
.wp-toc h2 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--read-muted); margin-bottom: 14px; }
.wp-toc ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.wp-toc li::marker { color: var(--read-muted); }
.wp-toc a { color: var(--read-text); }
.wp-toc a:hover { color: var(--agri-dark); text-decoration: underline; text-underline-offset: 3px; }

.wp-article { max-width: 70ch; font-size: 18px; line-height: 1.75; color: var(--read-text); }
.wp-article h2 { font-size: 28px; line-height: 1.3; font-weight: 700; color: #0f172a; margin: 56px 0 16px; padding-top: 8px; scroll-margin-top: 100px; }
.wp-article h2:first-child { margin-top: 0; }
.wp-article h3 { font-size: 21px; line-height: 1.35; font-weight: 700; color: #0f172a; margin: 32px 0 10px; }
.wp-article p { margin: 0 0 20px; }
.wp-article p, .wp-article li { color: var(--read-text); }
.wp-article strong { color: #0f172a; font-weight: 650; }
.wp-article ul, .wp-article ol { padding-left: 24px; margin: 0 0 22px; }
.wp-article li { margin-bottom: 10px; padding-left: 4px; }
.wp-article a { color: #0b5e36; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.wp-article a:hover { color: #128a4f; }
.wp-article sup { line-height: 0; }
.wp-article sup a { font-size: 13px; font-weight: 700; text-decoration: none; padding: 0 2px; }

.wp-summary {
	background: var(--agri-soft);
	border: 1px solid #c9ead7;
	border-left: 5px solid var(--agri);
	border-radius: 12px;
	padding: 28px 32px;
	margin-bottom: 40px;
}
.wp-summary h2 { margin-top: 0 !important; font-size: 23px; }
.wp-summary ul { margin-bottom: 0; }
.wp-summary li { margin-bottom: 12px; }

.callout {
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 20px 24px;
	margin: 28px 0;
	background: #fff;
	font-size: 17px;
	line-height: 1.65;
	box-shadow: 0 1px 3px rgba(9,29,62,.05);
}
.callout-label { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 8px; padding: 3px 10px; border-radius: 50px; }
.callout.established { border-left: 5px solid #116132; }
.callout.established .callout-label { color: #116132; background: #e7f6ec; }
.callout.claim { border-left: 5px solid #b8741a; }
.callout.claim .callout-label { color: #8a5300; background: #fff4e0; }
.callout.target { border-left: 5px solid #104cba; }
.callout.target .callout-label { color: #0c3990; background: #e8effc; }
.callout p:last-child { margin-bottom: 0; }

.wp-table-wrap { overflow-x: auto; margin: 26px 0 32px; border: 1px solid var(--border-color); border-radius: 12px; }
.wp-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.55; min-width: 560px; }
.wp-table th, .wp-table td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--border-color); vertical-align: top; color: var(--read-text); }
.wp-table th { background: var(--bg-alt); color: #0f172a; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.wp-table tbody tr:nth-child(even) td { background: #fafcfe; }
.wp-table tr:last-child td { border-bottom: 0; }
.wp-table caption { caption-side: bottom; font-size: 14px; padding: 12px 18px; text-align: left; color: var(--read-muted); }

.formula {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	background: #0f2a1c;
	color: #e6f4ec;
	border-radius: 12px;
	padding: 20px 24px;
	font-size: 15px;
	line-height: 1.7;
	overflow-x: auto;
	margin: 22px 0 28px;
	white-space: pre;
}

.wp-figure { margin: 30px 0; padding: 20px; border: 1px solid var(--border-color); border-radius: 12px; background: #fff; }
.wp-figure svg { width: 100%; height: auto; display: block; }
.wp-figure figcaption { font-size: 14px; line-height: 1.5; color: var(--read-muted); margin-top: 12px; }

.wp-refs { font-size: 15px; line-height: 1.6; padding-left: 22px; }
.wp-refs li { margin-bottom: 14px; overflow-wrap: anywhere; }

.wp-next { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 48px; }
.wp-next a { border: 1px solid var(--border-color); border-radius: 12px; padding: 20px 22px; display: block; color: #0f172a; font-weight: 700; font-size: 17px; line-height: 1.4; text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.wp-next a span { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--agri-dark); margin-bottom: 6px; }
.wp-next a:hover { border-color: var(--agri); box-shadow: 0 10px 25px rgba(9,29,62,.08); color: #0f172a; }

.wp-disclaimer { font-size: 14px; line-height: 1.6; color: var(--read-muted) !important; border-top: 1px solid var(--border-color); margin-top: 44px; padding-top: 20px; }

@media (max-width: 991px) {
	.wp-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
	.wp-toc { position: static; background: var(--bg-alt); border-left: 0; border-radius: 12px; padding: 20px 22px; }
	.wp-hero h1 { font-size: 32px; }
}
@media (max-width: 767px) {
	.wp-article { font-size: 17px; }
	.wp-article h2 { font-size: 24px; margin-top: 44px; }
	.wp-summary { padding: 22px 20px; }
	.wp-hero .wp-subtitle { font-size: 18px; }
	.wp-next { grid-template-columns: 1fr; }
	.wp-hero h1 { font-size: 27px; }
}

/* Print / Save as PDF */
@media print {
	.topbar, .site-header, .site-footer, .back-to-top, .wp-toc, .wp-actions, .wp-next { display: none !important; }
	body { font-size: 11pt; color: #000; }
	.wp-hero { background: none !important; color: #000; padding: 0 0 12pt; border-bottom: 2px solid #128a4f; }
	.wp-hero h1, .wp-hero .wp-subtitle, .wp-meta-row, .wp-meta-row strong, .wp-hero .eyebrow { color: #000 !important; }
	.wp-layout { display: block; }
	.section { padding: 12pt 0; }
	.wp-article { max-width: none; font-size: 11pt; }
	.wp-article h2 { break-after: avoid; font-size: 16pt; }
	.wp-table-wrap, .callout, .wp-figure, .formula { break-inside: avoid; }
	a { color: #000; }
	.formula { background: #f3f4f6 !important; color: #000 !important; }
	.wp-refs a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}
