/* Technical data sheet: one stylesheet for the on-screen preview and the A4 PDF
   (WeasyPrint). Logical properties keep right-to-left languages correct. */
/* One complete file per weight (Latin and Latin Extended merged): WeasyPrint garbles glyphs when it
   subsets a family split over several unicode-range files. Regenerate from the OFL fonts if they change. */
@font-face { font-family: 'Sheet Sans'; font-weight: 400; src: url("../fonts/pdf/sheet-sans-400.76d9dde664c8.ttf") format('truetype'); }
@font-face { font-family: 'Sheet Sans'; font-weight: 500; src: url("../fonts/pdf/sheet-sans-500.fa9a7019f655.ttf") format('truetype'); }
@font-face { font-family: 'Sheet Sans'; font-weight: 600; src: url("../fonts/pdf/sheet-sans-600.2611d06cb446.ttf") format('truetype'); }
@font-face { font-family: 'Sheet Head'; font-weight: 400; src: url("../fonts/pdf/sheet-head-400.4bf6606f22a1.ttf") format('truetype'); }
@font-face { font-family: 'Sheet Head'; font-weight: 500; src: url("../fonts/pdf/sheet-head-500.8e005498cd2f.ttf") format('truetype'); }
@font-face { font-family: 'Sheet Head'; font-weight: 600; src: url("../fonts/pdf/sheet-head-600.259a512bb346.ttf") format('truetype'); }

:root {
  --green: #304b3b;
  --red: #b63847;
  --ink: #1f2b23;
  --muted: #5c665f;
  --line: #d6dacd;
  --soft: #f3f1e9;
  --tint: #f7ece8;
}

html { font-size: 9pt; }
html[lang="ar"] { font-size: 9.6pt; }
body {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
  font-family: 'Sheet Sans', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans CJK SC', sans-serif;
}
html[lang="ar"] body { font-family: 'Alexandria', 'Noto Sans Arabic', 'Noto Sans', sans-serif; line-height: 1.7; }
html[lang="th"] body { font-family: 'Noto Sans Thai', 'Noto Sans', sans-serif; line-height: 1.65; }
html[lang="ja"] body { font-family: 'Noto Sans CJK JP', 'Noto Sans JP', sans-serif; }
html[lang="ko"] body { font-family: 'Noto Sans CJK KR', 'Noto Sans KR', sans-serif; }
html[lang="zh-hans"] body { font-family: 'Noto Sans CJK SC', 'Noto Sans SC', sans-serif; }
html[lang="zh-hant"] body { font-family: 'Noto Sans CJK TC', 'Noto Sans TC', sans-serif; }
h1, h2, h3, .ds-kicker, .ds-facts dt, .ds-meta dt, th {
  font-family: 'Sheet Head', 'Noto Sans', 'Noto Sans Arabic', 'Noto Sans Devanagari', 'Noto Sans Thai', 'Noto Sans CJK SC', sans-serif;
}
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] .ds-kicker, html[lang="ar"] .ds-facts dt, html[lang="ar"] .ds-meta dt, html[lang="ar"] th { font-family: 'Alexandria', 'Noto Sans Arabic', sans-serif; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3, html[lang="th"] .ds-kicker, html[lang="th"] .ds-facts dt, html[lang="th"] .ds-meta dt, html[lang="th"] th { font-family: 'Noto Sans Thai', sans-serif; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3, html[lang="ja"] .ds-kicker, html[lang="ja"] .ds-facts dt, html[lang="ja"] .ds-meta dt, html[lang="ja"] th { font-family: 'Noto Sans CJK JP', sans-serif; }
html[lang="ko"] h1, html[lang="ko"] h2, html[lang="ko"] h3, html[lang="ko"] .ds-kicker, html[lang="ko"] .ds-facts dt, html[lang="ko"] .ds-meta dt, html[lang="ko"] th { font-family: 'Noto Sans CJK KR', sans-serif; }
html[lang="zh-hans"] h1, html[lang="zh-hans"] h2, html[lang="zh-hans"] h3, html[lang="zh-hans"] .ds-kicker, html[lang="zh-hans"] .ds-facts dt, html[lang="zh-hans"] .ds-meta dt, html[lang="zh-hans"] th { font-family: 'Noto Sans CJK SC', sans-serif; }
html[lang="zh-hant"] h1, html[lang="zh-hant"] h2, html[lang="zh-hant"] h3, html[lang="zh-hant"] .ds-kicker, html[lang="zh-hant"] .ds-facts dt, html[lang="zh-hant"] .ds-meta dt, html[lang="zh-hant"] th { font-family: 'Noto Sans CJK TC', sans-serif; }

h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
img { display: block; }

/* ---- Title block ---------------------------------------------------- */
.ds-title { display: flex; justify-content: space-between; align-items: stretch; gap: 8mm; padding-bottom: 5mm; border-bottom: 2.2pt solid var(--green); }
.ds-title-main { flex: 1; min-width: 0; }
.ds-logo { width: 31mm; height: auto; margin-bottom: 5mm; }
.ds-kicker { font-size: 7.6pt; font-weight: 600; letter-spacing: 1.6pt; color: var(--red); margin-bottom: 2mm; }
html[lang="ar"] .ds-kicker, html[lang="th"] .ds-kicker, html[lang="ja"] .ds-kicker, html[lang="ko"] .ds-kicker, html[lang^="zh"] .ds-kicker, html[lang="hi"] .ds-kicker { letter-spacing: 0; }
h1 { font-size: 22pt; line-height: 1.15; font-weight: 600; color: var(--green); letter-spacing: -.3pt; }
.ds-sub { margin-top: 2.5mm; font-size: 10pt; color: var(--muted); }
.ds-meta { display: flex; gap: 9mm; margin-top: 4mm; }
.ds-meta dt { font-size: 6.8pt; letter-spacing: .8pt; color: var(--muted); }
.ds-meta dd { font-size: 9pt; font-weight: 500; color: var(--ink); margin-top: .6mm; }
.ds-hero { width: 56mm; height: 42mm; object-fit: cover; border-radius: 2.5mm; flex-shrink: 0; align-self: flex-end; }

/* ---- Key facts -------------------------------------------------------- */
.ds-facts { display: flex; flex-wrap: wrap; margin-top: 5mm; background: var(--green); color: #fff; border-radius: 2mm; padding: 1mm 2mm; }
.ds-facts > div { width: 25%; box-sizing: border-box; padding: 2.3mm 3mm; }
.ds-facts > .ds-facts-wide { width: 75%; }
.ds-facts dt { font-size: 6.6pt; letter-spacing: .9pt; color: #c9d8c2; margin-bottom: .8mm; }
.ds-facts dd { font-size: 8.6pt; line-height: 1.35; }
.ds-facts .ds-facts-wide dd { font-size: 8.4pt; }

.ds-notice { margin-top: 4mm; padding: 2.6mm 4.5mm; background: var(--tint); border-left: 2.4pt solid var(--red); font-size: 8.6pt; line-height: 1.5; }
.ds-notice strong { display: block; font-family: 'Sheet Head', 'Noto Sans', sans-serif; font-weight: 600; font-size: 9pt; color: var(--red); margin-bottom: .8mm; }
html[lang="ar"] .ds-notice strong { font-family: 'Alexandria', sans-serif; }

/* ---- Sections --------------------------------------------------------- */
section { margin-top: 5mm; break-inside: avoid; }
section.ds-flowing { break-inside: auto; }
.ds-h { counter-increment: sec; display: flex; align-items: baseline; gap: 3mm; font-size: 11pt; font-weight: 600; color: var(--green); padding-bottom: 1.8mm; margin-bottom: 2.4mm; border-bottom: .7pt solid var(--line); break-after: avoid; }
.ds-h::before { content: counter(sec, decimal-leading-zero); font-size: 8.4pt; font-weight: 600; color: var(--red); }
main { counter-reset: sec; }
.ds-lead { margin-bottom: 2.4mm; color: var(--ink); max-width: 165mm; }
.ds-note { margin-top: 2.2mm; font-size: 7.8pt; color: var(--muted); }

/* ---- Tables ------------------------------------------------------------ */
.ds-table { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
.ds-table thead th { background: var(--green); color: #fff; font-size: 7pt; font-weight: 500; letter-spacing: .5pt; text-align: start; padding: 2.1mm 3mm; }
.ds-table tbody th, .ds-table tbody td { text-align: start; vertical-align: top; padding: 1.8mm 3mm; border-bottom: .5pt solid var(--line); line-height: 1.38; }
.ds-table tbody tr:nth-child(even) > * { background: #f8f7f2; }
.ds-table tbody th { font-weight: 600; color: var(--green); width: 34%; }
.ds-table tbody td { color: var(--ink); }
.ds-table tr { break-inside: avoid; }
.ds-table thead { display: table-header-group; }
.ds-table small { display: block; margin-top: .6mm; font-family: 'Sheet Sans', 'Noto Sans', sans-serif; font-weight: 400; font-size: 7.4pt; color: var(--muted); }
.ds-varieties tbody th { width: 27%; }
.ds-varieties tbody td { width: 14%; }
.ds-varieties thead th { padding-left: 2mm; padding-right: 2mm; }
.ds-varieties tbody td, .ds-varieties tbody th { padding-left: 2mm; padding-right: 2mm; }
.ds-load tbody th { width: 38%; }
.ds-load tbody td { text-align: center; }
.ds-load thead th { text-align: center; }
.ds-load thead th:first-child { text-align: left; }
[dir=rtl] .ds-load thead th:first-child { text-align: right; }

/* ---- Flows (traceability and cold chain) ------------------------------- */
.ds-flowwrap { position: relative; margin: 1mm 0 4mm; break-inside: avoid; --node: var(--green); }
.ds-flowwrap.ds-flow-cold { --node: #46707c; }
.ds-flowwrap > i { position: absolute; z-index: 1; top: 3.7mm; height: .8pt; background: #b9c4ae; }
.ds-n5 > i { left: 10%; right: 10%; }
.ds-n6 > i { left: 8.33%; right: 8.33%; }
.ds-n7 > i { left: 7.14%; right: 7.14%; }
.ds-flow { list-style: none; display: flex; position: relative; z-index: 2; margin: 0; padding: 0; }
.ds-flow li { flex: 1; min-width: 0; text-align: center; font-size: 7.6pt; line-height: 1.3; padding: 0 1mm; }
.ds-flow li b { display: inline-block; vertical-align: top; width: 7.4mm; height: 7.4mm; margin-bottom: 1.6mm; border-radius: 50%; background: var(--node); color: #fff; font-family: 'Sheet Head', sans-serif; font-size: 7.6pt; font-weight: 500; line-height: 7.4mm; text-align: center; }
.ds-flow li span { display: block; }
.ds-flow li:last-child b { background: var(--red); }

/* ---- Lists and boxes ---------------------------------------------------- */
.ds-list { list-style: none; }
.ds-list li { position: relative; padding: 1mm 0 1mm 4.6mm; border-bottom: .5pt solid var(--line); font-size: 8.5pt; break-inside: avoid; }
.ds-list li::before, .ds-box li::before { content: ''; position: absolute; left: 0; top: 2.2mm; width: 1.7mm; height: 1.7mm; background: var(--green); }
.ds-list-cols { columns: 2; column-gap: 8mm; }
.ds-box { margin-top: 4mm; background: var(--soft); border-radius: 2mm; padding: 3.4mm 4.5mm; break-inside: avoid; }
.ds-box h3 { font-size: 7.2pt; font-weight: 600; letter-spacing: 1pt; color: var(--green); margin-bottom: 1.6mm; }
.ds-box ul { list-style: none; columns: 2; column-gap: 8mm; }
.ds-box li { break-inside: avoid; position: relative; padding: 1.1mm 0 1.1mm 4.6mm; font-size: 8.4pt; border-bottom: .4pt dashed #c4c9ba; }
.ds-box li:last-child { border-bottom: 0; }

/* ---- Process steps ------------------------------------------------------ */
.ds-steps { list-style: none; counter-reset: step; columns: 2; column-gap: 8mm; }
.ds-steps li { counter-increment: step; position: relative; display: block; padding: 1.7mm 0 1.7mm 9mm; border-bottom: .5pt solid var(--line); break-inside: avoid; }
.ds-steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 1.9mm; font-family: 'Sheet Head', sans-serif; font-size: 8pt; font-weight: 600; color: var(--red); }
.ds-steps li > div { display: block; }
.ds-steps strong { display: block; font-family: 'Sheet Head', 'Noto Sans', sans-serif; font-weight: 600; font-size: 8.6pt; color: var(--green); }
html[lang="ar"] .ds-steps strong { font-family: 'Alexandria', sans-serif; }
.ds-steps span { font-size: 8.3pt; color: var(--ink); }

/* ---- Closing block ------------------------------------------------------- */
.ds-closing { break-inside: avoid; }
.ds-contact { border: .8pt solid var(--green); border-radius: 2mm; padding: 4mm 5mm; }
.ds-contact h3 { font-size: 10pt; font-weight: 600; color: var(--green); margin-bottom: 2.4mm; }
.ds-contact dl { display: flex; flex-wrap: wrap; gap: 2mm 0; }
.ds-contact dl > div { width: 50%; box-sizing: border-box; padding-right: 4mm; }
.ds-contact dt { font-size: 6.8pt; letter-spacing: .8pt; color: var(--muted); }
.ds-contact dd { font-size: 8.8pt; font-weight: 500; }
.ds-disclaimer { margin-top: 3mm; font-size: 7.6pt; color: var(--muted); line-height: 1.5; }

/* ---- PDF: A4 page, running header and footer ----------------------------- */
@page {
  size: A4;
  margin: 23mm 15mm 18mm;
  @top-center { content: element(dsHeader); width: 100%; vertical-align: bottom; padding-bottom: 3mm; }
  @bottom-center { content: element(dsFooter); width: 100%; vertical-align: top; padding-top: 3mm; }
}
@page :first { margin-top: 14mm; @top-center { content: none; } }
body.is-pdf .ds-running-header { position: running(dsHeader); display: flex; align-items: center; justify-content: space-between; gap: 6mm; padding-bottom: 2mm; border-bottom: .7pt solid var(--green); font-size: 7.4pt; color: var(--muted); }
body.is-pdf .ds-running-header img { width: 24mm; height: auto; }
body.is-pdf .ds-running-footer { position: running(dsFooter); display: flex; justify-content: space-between; padding-top: 1.8mm; border-top: .5pt solid var(--line); font-size: 7.2pt; color: var(--muted); }
body.is-pdf .ds-foot-page::after { content: counter(page) " / " counter(pages); }
body.is-pdf .ds-hero { print-color-adjust: exact; }

/* ---- Screen preview ------------------------------------------------------- */
body.is-screen { background: #e6e3d8; }
body.is-screen .ds-toolbar { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line); }
body.is-screen .ds-toolbar-inner { max-width: 210mm; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }
body.is-screen .ds-back { color: var(--green); text-decoration: none; }
body.is-screen .ds-back .icon { width: 1em; height: 1em; vertical-align: -0.125em; }
[dir="rtl"] body.is-screen .ds-back .icon-arrow-left { transform: scaleX(-1); }
body.is-screen .ds-download { background: var(--red); color: #fff; text-decoration: none; padding: 9px 18px; border-radius: 30px; font-weight: 500; white-space: nowrap; }
body.is-screen .ds-download:hover { background: #9e2d3b; }
body.is-screen .ds-paper { width: 210mm; max-width: calc(100% - 24px); box-sizing: border-box; margin: 20px auto 40px; padding: 15mm; background: #fff; box-shadow: 0 6px 30px rgb(0 0 0 / .16); }
body.is-screen .ds-running-header { display: none; }
body.is-screen .ds-running-footer { display: flex; justify-content: center; width: 210mm; max-width: calc(100% - 24px); margin: -20px auto 40px; font-size: 12px; color: var(--muted); }
body.is-screen .ds-foot-page { display: none; }
@media (max-width: 720px) {
  body.is-screen .ds-paper { padding: 22px 16px; font-size: 14px; }
  .ds-title { flex-direction: column-reverse; }
  .ds-hero { width: 100%; height: 190px; }
  .ds-facts > div { width: 50%; }
  .ds-list-cols, .ds-box ul, .ds-steps { columns: 1; }
  .ds-table { font-size: 12.5px; }
  h1 { font-size: 26px; }
}
@media print {
  body.is-screen { background: #fff; }
  body.is-screen .ds-toolbar, body.is-screen .ds-running-footer { display: none; }
  body.is-screen .ds-paper { width: auto; max-width: none; margin: 0; padding: 0; box-shadow: none; }
}

/* Right-to-left mirrors for the properties above */
[dir=rtl] .ds-notice { border-left: 0; border-right: 2.4pt solid var(--red); }
[dir=rtl] .ds-list li, [dir=rtl] .ds-box li { padding-left: 0; padding-right: 4.6mm; }
[dir=rtl] .ds-list li::before, [dir=rtl] .ds-box li::before { left: auto; right: 0; }
[dir=rtl] .ds-contact dl > div { padding-right: 0; padding-left: 4mm; }
[dir=rtl] .ds-steps li { padding-left: 0; padding-right: 9mm; }
[dir=rtl] .ds-steps li::before { left: auto; right: 0; }
[dir=rtl] dd[dir=ltr], [dir=rtl] th[dir=ltr], [dir=rtl] td[dir=ltr] { text-align: right; }

.ds-contact a, .ds-running-footer a { color: inherit; text-decoration: none; }
.ds-value { font-weight: 600; color: var(--green); white-space: nowrap; margin-inline-end: 1.5mm; }
[dir=rtl] .ds-value { margin-right: 0; margin-left: 1.5mm; }
[dir=ltr] .ds-value { margin-left: 0; margin-right: 1.5mm; }

/* two tables one under the other (cartons and shipping), and no lead paragraph left alone at a page end */
.ds-two > .ds-table + .ds-table { margin-top: 4mm; }
.ds-lead { break-after: avoid; }
