/* Rchem EUDR Check. All rules are scoped to .rchem-eudr so the theme is not affected.
   Palette from the Rchem logo: orange #C45E18, grey #838383.
   #C45E18 is used for rules, numbers and accents; text and buttons use #A84D10,
   which keeps the same hue with enough contrast (WCAG AA) on white. */
.rchem-eudr {
  --rce-orange: #c45e18;
  --rce-orange-dark: #a84d10;
  --rce-orange-tint: #fbf1ea;
  --rce-grey: #838383;
  --rce-text: #2b2b2b;
  --rce-text-2: #595959;
  --rce-rule: #dcdcdc;
  --rce-rule-strong: #b5b5b5;
  --rce-bg: #ffffff;
  --rce-error: #b3261e;
  --rce-focus: #a84d10;
  color: var(--rce-text);
  background: var(--rce-bg);
  font-family: inherit;
  font-size: 16px;
  line-height: 1.6;
  max-width: 820px;
  margin: 0 auto;
  box-sizing: border-box;
}
.rchem-eudr *, .rchem-eudr *::before, .rchem-eudr *::after { box-sizing: inherit; }
.rchem-eudr [hidden] { display: none !important; }
.rchem-eudr p { margin: 0 0 0.7em; }
.rchem-eudr a { color: var(--rce-orange-dark); text-decoration: underline; text-underline-offset: 2px; }
.rchem-eudr a:hover { color: var(--rce-text); }
.rchem-eudr h2.rce-h2 { font-size: 1.5em; font-weight: 500; margin: 0.4em 0 0.2em; }
.rchem-eudr h3 { font-size: 1.15em; font-weight: 600; margin: 0; }
.rchem-eudr h4 { font-size: 1em; font-weight: 600; margin: 0 0 0.5em; }
.rchem-eudr h5 { font-size: 0.95em; font-weight: 600; margin: 1em 0 0.4em; color: var(--rce-text-2); }
.rchem-eudr :focus-visible { outline: 2px solid var(--rce-focus); outline-offset: 2px; }

.rchem-eudr .rce-intro { margin-bottom: 1.6em; }
.rchem-eudr .rce-legal, .rchem-eudr .rce-meta { color: var(--rce-text-2); font-size: 0.92em; }
.rchem-eudr .rce-contact-line { font-size: 0.92em; padding-top: 0.6em; border-top: 1px solid var(--rce-rule); }
.rchem-eudr .rce-muted { color: var(--rce-text-2); }
.rchem-eudr .rce-small { font-size: 0.9em; }
.rchem-eudr .rce-strong { font-weight: 600; }

/* Form: numbered sections separated by rules */
.rchem-eudr .rce-fieldset { border: 0; border-top: 2px solid var(--rce-orange); padding: 0.9em 0 0.4em; margin: 0 0 1.4em; min-width: 0; }
.rchem-eudr .rce-fieldset > legend { font-weight: 600; font-size: 1.1em; padding: 0 0.5em 0 0; float: left; width: 100%; margin-bottom: 0.6em; }
.rchem-eudr .rce-fieldset > legend + * { clear: both; }
.rchem-eudr .rce-sub { border: 0; padding: 0; margin: 1.1em 0 0; min-width: 0; }
.rchem-eudr .rce-sub > legend, .rchem-eudr .rce-sub > label:not(.rce-radio):not(.rce-check) { font-weight: 600; padding: 0; margin-bottom: 0.3em; display: block; }
.rchem-eudr label { display: block; }
.rchem-eudr .rce-options { display: grid; gap: 0.1em; }
.rchem-eudr .rce-radio, .rchem-eudr .rce-check { display: flex; gap: 0.6em; align-items: flex-start; padding: 0.3em 0; cursor: pointer; font-weight: 400; }
.rchem-eudr .rce-radio input, .rchem-eudr .rce-check input { margin-top: 0.32em; flex: 0 0 auto; width: 1.05em; height: 1.05em; accent-color: var(--rce-orange-dark); }
.rchem-eudr .rce-radio:has(input:checked) span { font-weight: 600; }
.rchem-eudr input:not([type=radio]):not([type=checkbox]), .rchem-eudr select {
  font: inherit; color: inherit; background: #fff; width: 100%; max-width: 22em;
  padding: 0.5em 0.65em; border: 1px solid var(--rce-rule-strong); border-radius: 2px;
}
.rchem-eudr input:not([type=radio]):not([type=checkbox]):focus, .rchem-eudr select:focus { border-color: var(--rce-orange-dark); }
.rchem-eudr input[name=cn] { font-size: 1.1em; letter-spacing: 0.05em; max-width: 12em; }
.rchem-eudr input[aria-invalid=true] { border-color: var(--rce-error); border-width: 2px; }
.rchem-eudr .rce-help { font-size: 0.88em; color: var(--rce-text-2); margin: 0.3em 0 0; }
.rchem-eudr .rce-error-text { color: var(--rce-error); font-weight: 600; margin: 0.3em 0 0; }
.rchem-eudr .rce-error-text:empty, .rchem-eudr .rce-cn-preview:empty { display: none; }
.rchem-eudr .rce-cn-preview { margin: 0.6em 0 0; }
.rchem-eudr .rce-cn-desc { font-size: 0.88em; color: var(--rce-text-2); }
.rchem-eudr .rce-calc { border-top: 1px dashed var(--rce-rule-strong); padding: 0.7em 0 0; margin-top: 0.9em; }
.rchem-eudr .rce-calc-title { font-weight: 600; margin-bottom: 0.4em; }
.rchem-eudr .rce-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.7em; }
.rchem-eudr .rce-grid3 label { font-size: 0.9em; }
.rchem-eudr .rce-calc-result { font-weight: 600; margin-top: 0.6em; }
.rchem-eudr .rce-thresholds { padding-left: 1.2em; margin: 0.2em 0 0; }
.rchem-eudr .rce-country-row { display: flex; gap: 0.5em; flex-wrap: wrap; }
.rchem-eudr .rce-country-row input { flex: 1 1 14em; }
.rchem-eudr .rce-chips { list-style: none; padding: 0; margin: 0.7em 0 0; display: flex; flex-wrap: wrap; gap: 0.4em; }
.rchem-eudr .rce-chips li { display: inline-flex; align-items: center; gap: 0.2em; border: 1px solid var(--rce-rule-strong); border-radius: 2px; padding: 0.1em 0.2em 0.1em 0.6em; font-size: 0.95em; }
.rchem-eudr .rce-chips li.rce-muted { border: 0; padding-left: 0; }
.rchem-eudr .rce-chip-x { border: 0; background: none; color: var(--rce-text-2); font-size: 1.15em; line-height: 1; padding: 0.15em 0.4em; cursor: pointer; }
.rchem-eudr .rce-chip-x:hover { color: var(--rce-error); }

/* Buttons */
.rchem-eudr .rce-btn {
  font: inherit; font-weight: 600; display: inline-block; text-decoration: none; cursor: pointer;
  padding: 0.55em 1.3em; border-radius: 2px; border: 1px solid var(--rce-orange-dark);
  background: #fff; color: var(--rce-orange-dark); min-height: 44px; line-height: 1.5;
}
.rchem-eudr .rce-btn:hover { background: var(--rce-orange-tint); color: var(--rce-orange-dark); }
.rchem-eudr .rce-btn--primary { background: var(--rce-orange-dark); color: #fff; }
.rchem-eudr .rce-btn--primary:hover { background: #8f400c; border-color: #8f400c; color: #fff; }
.rchem-eudr .rce-link-btn { font: inherit; background: none; border: 0; padding: 0.4em 0.2em; color: var(--rce-orange-dark); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; min-height: 44px; }
.rchem-eudr .rce-link-btn:hover { color: var(--rce-text); }
.rchem-eudr .rce-submit-row { margin: 0.4em 0 1.6em; }
.rchem-eudr .rce-submit-row .rce-btn { font-size: 1.05em; padding: 0.6em 2.4em; }
.rchem-eudr .rce-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Results as a report */
.rchem-eudr .rce-results:not(:empty) { border-top: 1px solid var(--rce-rule); padding-top: 1.4em; margin-top: 0.6em; }
.rchem-eudr .rce-report-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1em; flex-wrap: wrap; padding-bottom: 0.9em; border-bottom: 2px solid var(--rce-orange); margin-bottom: 1em; }
.rchem-eudr .rce-logo { height: 48px; width: auto; display: block; }
.rchem-eudr .rce-report-company { font-size: 0.85em; line-height: 1.5; text-align: right; color: var(--rce-text-2); }
.rchem-eudr .rce-report-company strong { color: var(--rce-text); }
.rchem-eudr .rce-summary { padding: 0.55em 0; border-top: 1px solid var(--rce-rule); border-bottom: 1px solid var(--rce-rule); }
.rchem-eudr .rce-card { padding: 1.2em 0 0.4em; border-bottom: 1px solid var(--rce-rule); margin: 0 0 1em; }
.rchem-eudr .rce-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; margin-bottom: 0.7em; }
.rchem-eudr .rce-card-head h3:focus { outline: none; }
.rchem-eudr .rce-num { color: var(--rce-orange); }
.rchem-eudr .rce-remove { font-size: 0.9em; flex: 0 0 auto; }
.rchem-eudr .rce-facts { width: 100%; border-collapse: collapse; margin: 0 0 1.1em; font-size: 0.97em; }
.rchem-eudr .rce-facts th, .rchem-eudr .rce-facts td { text-align: left; vertical-align: top; padding: 0.45em 0.6em 0.45em 0; border-bottom: 1px solid var(--rce-rule); }
.rchem-eudr .rce-facts th { font-weight: 400; color: var(--rce-text-2); width: 34%; }
.rchem-eudr .rce-facts tr:first-child th, .rchem-eudr .rce-facts tr:first-child td { border-top: 1px solid var(--rce-rule-strong); }
.rchem-eudr .rce-status { font-weight: 600; }
.rchem-eudr .rce-status::before { content: ""; display: inline-block; width: 0.6em; height: 0.6em; margin-right: 0.45em; vertical-align: 0.05em; background: var(--rce-grey); }
.rchem-eudr .rce-status--in::before { background: var(--rce-orange); }
.rchem-eudr .rce-status--check::before { background: transparent; border: 2px solid var(--rce-orange); }
.rchem-eudr .rce-status--out::before { background: var(--rce-grey); }
.rchem-eudr .rce-block { margin: 0 0 1em; }
.rchem-eudr .rce-block ul, .rchem-eudr .rce-block ol { margin: 0.3em 0 0.6em; padding-left: 1.4em; }
.rchem-eudr .rce-block li { margin-bottom: 0.4em; }
.rchem-eudr .rce-block ol li::marker { color: var(--rce-orange); font-weight: 600; }
.rchem-eudr .rce-warn-text { color: var(--rce-orange-dark); font-size: 0.92em; }
.rchem-eudr .rce-hint { font-size: 0.92em; margin-top: 0.6em; }
.rchem-eudr .rce-hint strong { color: var(--rce-orange-dark); }
.rchem-eudr .rce-refs { color: var(--rce-text-2); font-size: 0.85em; }
.rchem-eudr .rce-notreq { color: var(--rce-text-2); font-size: 0.92em; }
.rchem-eudr .rce-notes summary { cursor: pointer; font-weight: 600; padding: 0.3em 0; color: var(--rce-orange-dark); }
.rchem-eudr .rce-notes ul { font-size: 0.92em; }
.rchem-eudr .rce-cta { border: 1px solid var(--rce-rule-strong); border-top: 3px solid var(--rce-orange); padding: 1.1em 1.3em 0.6em; margin: 1.6em 0 1em; }
.rchem-eudr .rce-cta h3 { margin-bottom: 0.4em; }
.rchem-eudr .rce-cta-contact { font-size: 0.95em; line-height: 1.8; }
.rchem-eudr .rce-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4em 1em; margin-bottom: 1.6em; }
.rchem-eudr .rce-footer { border-top: 1px solid var(--rce-rule); margin-top: 1.6em; padding-top: 1em; font-size: 0.84em; color: var(--rce-text-2); }
.rchem-eudr .rce-footer-company { color: var(--rce-text); line-height: 1.7; }
.rchem-eudr .rce-print-footer { display: none; }
.rchem-eudr .rce-error, .rchem-eudr .rce-loading { padding: 1em 0; }
.rchem-eudr .rce-error { color: var(--rce-error); }

@media (max-width: 600px) {
  .rchem-eudr { font-size: 15.5px; }
  .rchem-eudr .rce-grid3 { grid-template-columns: 1fr; }
  .rchem-eudr .rce-report-company { text-align: left; }
  .rchem-eudr .rce-facts th { width: 40%; }
  .rchem-eudr .rce-submit-row .rce-btn, .rchem-eudr .rce-cta .rce-btn { width: 100%; text-align: center; }
}

/* Printable report: letterhead, results, disclaimer, company footer on every page */
@media print {
  @page { margin: 16mm 14mm 20mm; }
  .rchem-eudr { max-width: none; font-size: 10.5pt; color: #000; }
  .rchem-eudr .rce-intro, .rchem-eudr .rce-form, .rchem-eudr .rce-actions,
  .rchem-eudr .rce-cta .rce-btn, .rchem-eudr .rce-remove, .rchem-eudr .rce-footer-company { display: none !important; }
  .rchem-eudr .rce-results:not(:empty) { border: 0; padding: 0; margin: 0; }
  .rchem-eudr .rce-notes > summary { list-style: none; }
  .rchem-eudr .rce-notes:not([open]) > *:not(summary) { display: block; }
  .rchem-eudr .rce-card { break-inside: auto; }
  .rchem-eudr .rce-card-head, .rchem-eudr .rce-facts { break-inside: avoid; }
  .rchem-eudr a { color: #000; text-decoration: none; }
  .rchem-eudr .rce-cta { break-inside: avoid; }
  .rchem-eudr .rce-print-footer {
    display: block; position: fixed; bottom: 0; left: 0; right: 0;
    font-size: 8pt; color: #444; border-top: 1px solid var(--rce-orange); padding-top: 3pt; text-align: center;
  }
  .rchem-eudr .rce-footer { margin-bottom: 14mm; }
  .rchem-eudr .rce-logo, .rchem-eudr .rce-status::before, .rchem-eudr .rce-summary { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  .rchem-eudr * { scroll-behavior: auto !important; }
}
