/* EUDR Pack — site styles. Blue accent, light page, white cards, 12px radius. */
:root {
  color-scheme: light dark;
  --bg: #f8fafd;
  --surface: #ffffff;
  --surface-2: #f0f4f9;
  --ink: #18181b;
  --ink-2: #35353a;
  --ink-3: #57575f;
  --line: #e5e5e8;
  --line-2: #c9c9cf;
  --accent: #0b57d0;
  --accent-d: #0842a0;
  --accent-ink: #ffffff;
  --accent-soft: #e8f0fe;
  --ok: #137333;
  --ok-soft: #e6f4ea;
  --amber: #8a6100;
  --amber-soft: #fef7e0;
  --red: #b3261e;
  --red-soft: #fbe9e7;
  --r: 12px;
  --r-sm: 8px;
  --shadow: 0 1px 2px rgba(24, 24, 27, .04);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1116;
    --surface: #171a21;
    --surface-2: #1e222b;
    --ink: #e8eaf0;
    --ink-2: #c3c7d1;
    --ink-3: #9aa0ad;
    --line: #2b303b;
    --line-2: #3c4250;
    --accent: #8ab4f8;
    --accent-d: #aecbfa;
    --accent-ink: #0b1220;
    --accent-soft: #1b2a44;
    --ok: #81c995;
    --ok-soft: #173223;
    --amber: #fdd663;
    --amber-soft: #332b10;
    --red: #f28b82;
    --red-soft: #3a1c1a;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1116;
  --surface: #171a21;
  --surface-2: #1e222b;
  --ink: #e8eaf0;
  --ink-2: #c3c7d1;
  --ink-3: #9aa0ad;
  --line: #2b303b;
  --line-2: #3c4250;
  --accent: #8ab4f8;
  --accent-d: #aecbfa;
  --accent-ink: #0b1220;
  --accent-soft: #1b2a44;
  --ok: #81c995;
  --ok-soft: #173223;
  --amber: #fdd663;
  --amber-soft: #332b10;
  --red: #f28b82;
  --red-soft: #3a1c1a;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
a:hover { color: var(--accent-d); }
button, a, summary, input, textarea { min-height: 2.25rem; }
:focus-visible { outline: 3px solid var(--line-2); outline-offset: 2px; }
img, svg { max-width: 100%; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px 56px; }

/* header — sticky top bar */
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-row { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-size: 1.2rem; font-weight: 700; margin-right: auto; }
.brand b { color: var(--accent); }
.brand-mark { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { color: var(--ink-2); text-decoration: none; padding: .45em .7em; border-radius: 6px; font-weight: 500; font-size: .95rem; }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.btn-top { background: var(--accent); color: var(--accent-ink) !important; margin-left: 6px; }
.btn-top:hover { background: var(--accent-d) !important; }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: center; padding: 40px 0 28px; }
h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .4em; }
h2 { font-size: 1.4rem; line-height: 1.25; margin: 0 0 .5em; }
h3 { font-size: 1.05rem; line-height: 1.3; margin: 0 0 .4em; }
.lede { font-size: 1.08rem; color: var(--ink-2); margin: 0 0 14px; max-width: 620px; }
.points { display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0 0 20px; color: var(--ink-2); font-size: .92rem; }
.points li::before { content: "\2713"; color: var(--ok); font-weight: 700; margin-right: 6px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.small { font-size: .875rem; color: var(--ink-3); margin: 0; }

/* product preview card — shows the result before the user uploads anything */
.preview-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.preview-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); font-size: .9rem; color: var(--ink-2); }
.pill { font-size: .8rem; font-weight: 600; color: var(--ok); background: var(--ok-soft); border-radius: 999px; padding: .3em .75em; white-space: nowrap; }
.preview-body { padding: 16px; display: grid; gap: 12px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: .92rem; }
.mini-row .sev { margin-left: auto; }
.mini-row .plot-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); flex: none; }
.mini-row.warn .plot-dot { background: var(--amber); }
.mini-row.miss .plot-dot { background: var(--ink-3); }
.mini-row.pass .plot-dot { background: var(--ok); }

/* sections */
.section { padding: 28px 0; }
.section-head { margin-bottom: 18px; }
.section-head p { color: var(--ink-2); margin: 0; max-width: 680px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.step-num { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-weight: 700; margin-bottom: 12px; }
.step p { margin: 0; color: var(--ink-2); font-size: .95rem; }
.photo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 8px 0 0; }
.photo-slot { margin: 0; }
.photo-slot img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; display: block; border-radius: var(--r); border: 1px solid var(--line); }
.photo-slot figcaption { margin-top: 6px; }
@media (max-width: 860px) { .photo-row { grid-template-columns: 1fr; } }

/* tool — file drop, paste, actions */
.tool-section { padding: 8px 0 0; }
.panel, .result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  margin-top: 20px;
}
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 2px dashed var(--line-2); border-radius: var(--r); padding: 28px 16px; text-align: center;
  cursor: pointer; background: var(--surface-2); position: relative;
}
.drop:hover, .drop.over { border-color: var(--accent); }
.drop input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-title { font-weight: 600; }
.drop-sub { font-size: .875rem; color: var(--ink-3); }

.paste { margin-top: 14px; }
.paste summary { cursor: pointer; color: var(--ink-2); font-size: .95rem; padding: 6px 0; }
.paste textarea {
  width: 100%; min-height: 150px; margin-top: 8px; resize: vertical;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); color: var(--ink);
  padding: 12px; font-family: var(--mono); font-size: 13px;
}
.samples { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 14px 0 4px; font-size: .92rem; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn {
  font: 600 .95rem/1 var(--font); cursor: pointer;
  border: 1px solid var(--accent); background: var(--surface); color: var(--accent);
  border-radius: var(--r-sm); padding: .72em 1.2em;
}
.btn:hover:not(:disabled) { background: var(--accent-soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-d); border-color: var(--accent-d); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.error {
  margin: 14px 0 0; padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--red-soft); color: var(--red); font-size: .95rem; font-weight: 600;
}

/* result */
.verdict { font-weight: 700; padding: 12px 16px; border-radius: var(--r-sm); margin-bottom: 14px; }
.verdict.pass { background: var(--ok-soft); color: var(--ok); }
.verdict.fail { background: var(--red-soft); color: var(--red); }

.counts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 560px) { .counts { grid-template-columns: repeat(4, 1fr); } }
.count { background: var(--surface-2); border-radius: var(--r-sm); padding: 12px 14px; }
.count .n { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; }
.count .k { font-size: .85rem; color: var(--ink-3); }
.count.err .n { color: var(--red); }
.count.warn .n { color: var(--amber); }
.count.miss .n { color: var(--ink-2); }
.count.ok .n { color: var(--ok); }

.meta { margin: 12px 0 4px; }

.issues { list-style: none; padding: 0; margin: 14px 0 0; }
.issue {
  display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: baseline;
  padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: .95rem;
}
.issue:last-child { border-bottom: none; }
.sev { font-size: 12px; font-weight: 700; border-radius: 5px; padding: 2px 8px; white-space: nowrap; }
.sev.err { background: var(--red-soft); color: var(--red); }
.sev.warn { background: var(--amber-soft); color: var(--amber); }
.sev.miss { background: var(--surface-2); color: var(--ink-2); }
.sev.ok { background: var(--ok-soft); color: var(--ok); }
.rule { font-family: var(--mono); font-size: 12.5px; color: var(--ink-3); }
.body { overflow-wrap: anywhere; }
.plot { color: var(--ink); }
.fixable { color: var(--ok); font-size: .875rem; }
.euref { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

@media (max-width: 480px) {
  .issue { grid-template-columns: auto 1fr; }
  .issue .rule { display: none; }
}

/* gate (paid, not open yet) */
.gate { margin-top: 20px; padding: 16px 18px; border: 1px dashed var(--amber); border-radius: var(--r); background: var(--amber-soft); }
.gate p { margin: 0 0 10px; color: var(--ink-2); font-size: .95rem; }

/* plot map (offline SVG preview) */
.map-wrap { margin: 16px 0 6px; }
.map-wrap[hidden] { display: none; }
#map { width: 100%; height: auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
#map .plot { stroke-width: 1.5; fill-opacity: .35; }
#map circle.plot { fill-opacity: .8; }
#map .sev-err { fill: var(--red); stroke: var(--red); }
#map .sev-warn { fill: var(--amber); stroke: var(--amber); }
#map .sev-miss { fill: var(--ink-3); stroke: var(--ink-3); }
#map .sev-ok { fill: var(--ok); stroke: var(--ok); }

.foot { margin-top: 40px; border-top: 1px solid var(--line); padding-top: 16px; }

/* phone */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; padding-top: 24px; }
  .steps { grid-template-columns: 1fr; }
  .topnav a:not(.btn-top) { display: none; }
}

/* Deadline strip under the hero (plan item 4). */
.deadline-strip {
  margin: 8px 0 28px;
  padding: 14px 18px;
  border-radius: var(--r);
  background: var(--accent-soft);
  color: var(--ink);
  border: 1px solid var(--line);
}
.deadline-strip p { margin: 0; line-height: 1.5; }
.deadline-strip strong { color: var(--accent-d); }

/* Pricing page (plan item 3). */
.pricing-intro { padding-top: 40px; }
.pricing-intro h1 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.tiers {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}
.tier {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 20px;
  box-shadow: var(--shadow);
}
.tier h2 { font-size: 18px; margin: 0; }
.tier-plots { color: var(--ink-3); margin: 4px 0 12px; font-size: 14px; }
.tier-price { font-size: 30px; font-weight: 700; color: var(--accent-d); margin: 0 0 12px; }
.tier ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.tier-quote .tier-price { font-size: 24px; }
.pricing-terms { margin-bottom: 24px; }
.pricing-terms ul { padding-left: 18px; line-height: 1.6; }
.pricing-cta { margin: 8px 0 32px; }
@media (max-width: 860px) {
  .tiers { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .tiers { grid-template-columns: 1fr; }
}


/* Results-screen call to action and per-tier order buttons.
   Links come from assets/js/checkout-config.js. */
.fix-cta {
  margin: 20px 0 8px;
  padding: 16px 18px;
  border-radius: var(--r);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.fix-cta p { margin: 0 0 12px; }
.fix-cta p:last-child { margin-bottom: 0; }
.fix-cta .btn, .tier-order .btn { text-decoration: none; display: inline-block; margin-bottom: 10px; }
.tier { display: flex; flex-direction: column; }
.tier-order { margin-top: auto; padding-top: 16px; }
.tier-order p { margin: 0; }
.order-steps { padding-left: 20px; line-height: 1.7; }
.order-ref { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }

/* Legal pages and footer links */
.legal .panel { margin-bottom: 16px; }
.legal .panel h2 { margin-top: 0; }
.legal .panel ul { padding-left: 18px; line-height: 1.6; }
.legal .panel p { line-height: 1.6; }
.foot-links { margin-bottom: 8px; }
.foot-links a { color: inherit; }

/* Homepage file checker */
#check {
  scroll-margin-top: 84px;
  margin-block: 28px 44px;
}
#check .panel, #check .result {
  padding: clamp(18px, 3vw, 32px);
  border-radius: 18px;
  box-shadow: var(--shadow);
}
#check h2 { margin-bottom: 6px; }
.checker-intro { color: var(--ink-3); margin: 0 0 18px; }
#check .drop {
  background: var(--accent-soft);
  border-color: var(--accent);
  padding-block: clamp(22px, 4vw, 38px);
}
#check .drop:hover { border-style: solid; }
#check .drop:focus-within, #check :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
#check .samples { flex-wrap: wrap; }
#check .actions .btn { min-height: 44px; }
@media (max-width: 560px) {
  #check .panel, #check .result { padding: 16px; }
  #check .actions .primary { flex: 1; }
}
#result { scroll-margin-top: 84px; }
.formats { margin-top: 14px; font-size: .95rem; }
.formats summary { cursor: pointer; color: var(--ink-2); padding: 6px 0; }
.formats p, .formats ul { margin: 8px 0; line-height: 1.55; }
.formats ul { padding-left: 1.2em; }
.formats code { font-size: .9em; }
.csv-example {
  overflow-x: auto;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: .82rem;
}
.notfound { padding-block: 56px; }
.scope-strip { margin: 0 0 16px; padding: 12px 16px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--surface); }
.tier-order .btn { display: inline-block; text-decoration: none; }
.tier-order .small { margin: 6px 0 0; }
.tier-currency { margin: 10px 0 0; color: var(--ink-3); }
.map-note { margin: 6px 0 0; color: var(--ink-3); }
#map[hidden] { display: none; }
