<!doctype html>
<html lang="en">
<head><base href="about:srcdoc"><script>(function(){function n(){parent.postMessage({t:'share:hash',h:location.hash},'*')}addEventListener('hashchange',n);addEventListener('message',function(e){if(e.source!==parent)return;var d=e.data||{};if(d.t==='share:setHash'&&typeof d.h==='string'&&d.h!==location.hash){location.hash=d.h}});addEventListener('DOMContentLoaded',function(){parent.postMessage({t:'share:ready',h:location.hash},'*')});})();</script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Phytosanitary Certificate (Export) — IPPC ePhyto Hub Integration · Bhutan</title>
<meta name="description" content="Presentation and explainer for Bhutan's Phytosanitary export certificate service and its integration with the IPPC ePhyto Hub.">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<style>
:root{
  --navy:#1a1a2e; --ink:#101110; --accent:#e8611a; --accent-text:#b8470f; --accent2:#ff8c00;
  --primary:#f35f3f; --primary-500:#e33d28; --primary-600:#c42d1a;
  --flag-yellow:#ffcc00; --flag-green:#2d9d5f; --green:#1f9762; --mute-green:#2d8659;
  --surface:#f9f9fc; --neutral-50:#fafbfc; --border:#e4e6ea; --muted:#565a56;
  --soft-yellow:#fff9e6; --soft-orange:#fff7ed; --brown:#8b4513; --red:#db2129;
  --sans:"Poppins",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans",sans-serif;
  --serif:"Poppins",-apple-system,"Segoe UI",sans-serif;
  --shadow:0 8px 26px rgba(18,32,51,.06); --shadow-lg:0 14px 40px rgba(18,32,51,.10);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:84px}
body{font-family:var(--sans);color:var(--ink);background:var(--surface);line-height:1.55;font-size:16px;-webkit-font-smoothing:antialiased}
a{color:var(--primary-600);text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{font-family:var(--serif);color:var(--navy);line-height:1.18;font-weight:700;letter-spacing:-.01em}
.wrap{max-width:1060px;margin:0 auto;padding:0 22px}
.flagstripe{height:5px;background:linear-gradient(45deg,var(--flag-yellow),var(--flag-green),var(--flag-yellow),var(--flag-green));background-size:300% 100%}

/* ── Top bar ── */
.topbar{background:#2a3358;color:#fff;position:sticky;top:0;z-index:50;border-bottom:1px solid transparent;transition:border-color .25s ease,box-shadow .25s ease}
.topbar.scrolled{border-bottom-color:#f6dcc8;box-shadow:0 3px 14px rgba(232,97,26,.10)}
.topbar .wrap{max-width:1160px;display:flex;align-items:center;gap:14px;height:60px;flex-wrap:nowrap}
.brand{display:flex;align-items:center;gap:11px;font-family:var(--serif);font-weight:700;font-size:17px;color:#fff;flex:0 0 auto;line-height:1.12}
.emblem{width:34px;height:34px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;font-size:18px;
  background:radial-gradient(circle at 50% 38%,var(--flag-yellow) 0 48%,var(--flag-green) 48% 100%);
  box-shadow:0 0 0 2px rgba(255,255,255,.25)}
.brand small{display:block;font-family:var(--sans);font-weight:500;font-size:10.5px;letter-spacing:.02em;color:#aeb4cf;margin-top:1px;white-space:nowrap}
.topnav{margin-left:auto;display:flex;gap:2px;flex-wrap:nowrap;white-space:nowrap}
.topnav a{color:#d7d9e4;font-size:12.5px;font-weight:500;padding:7px 9px;border-radius:8px}
.topnav a:hover{background:rgba(255,255,255,.10);color:#fff;text-decoration:none}
.btn{display:inline-flex;align-items:center;gap:8px;font-family:var(--sans);font-weight:600;font-size:14px;
  border:none;border-radius:9px;padding:10px 16px;cursor:pointer;transition:.15s}
.btn-primary{background:var(--primary);color:#fff}
.btn-primary:hover{background:var(--primary-600);text-decoration:none;color:#fff}
.btn-ghost{background:rgba(255,255,255,.12);color:#fff}
.btn-ghost:hover{background:rgba(255,255,255,.22);text-decoration:none;color:#fff}

/* ── Hero ── */
.hero{background:
   radial-gradient(1100px 380px at 88% -8%,rgba(232,97,26,.10),transparent 60%),
   linear-gradient(180deg,#fff,var(--surface));
   border-bottom:1px solid var(--border);padding:46px 0 38px}
.eyebrow{display:inline-flex;align-items:center;gap:8px;color:var(--accent-text);font-weight:700;font-size:11.5px;letter-spacing:.16em;text-transform:uppercase}
.eyebrow::before{content:"";width:22px;height:2px;background:var(--accent);display:inline-block}
.hero h1{font-size:38px;margin:12px 0 8px;max-width:18ch}
.hero .lede{color:var(--muted);font-size:17px;max-width:64ch}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.chip{display:inline-flex;align-items:center;gap:7px;font-size:12.5px;font-weight:600;padding:7px 12px;border-radius:999px;border:1px solid var(--border);background:#fff;color:var(--navy)}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block}
.dot.g{background:var(--green)} .dot.a{background:var(--accent)} .dot.b{background:var(--navy)}
.hero-actions{margin-top:22px;display:flex;gap:10px;flex-wrap:wrap}
.hero-actions .btn-primary:hover{color:#fff}
.btn-outline{background:#fff;border:1px solid var(--border);color:var(--navy);font-weight:600;border-radius:9px;padding:10px 16px;display:inline-flex;gap:8px;align-items:center}
.btn-outline:hover{border-color:var(--accent);color:var(--accent);text-decoration:none}

/* ── Sections ── */
section{padding:44px 0;border-bottom:1px solid var(--border)}
.sec-head{display:flex;align-items:baseline;gap:14px;margin-bottom:6px}
.sec-num{font-family:var(--serif);font-weight:700;color:var(--accent-text);font-size:15px;letter-spacing:.04em}
.sec-head h2{font-size:27px}
.sec-sub{color:var(--muted);font-size:15.5px;max-width:74ch;margin:6px 0 22px}

/* ── Cards / grids ── */
.card{background:#fff;border:1px solid var(--border);border-radius:16px;padding:22px 24px;box-shadow:var(--shadow)}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:1fr 1fr} .g3{grid-template-columns:repeat(3,1fr)}
@media(max-width:820px){.g2,.g3{grid-template-columns:1fr}}

/* At-a-glance reference table */
.facts{display:grid;grid-template-columns:1fr 1fr;gap:0;border:1px solid var(--border);border-radius:16px;overflow:hidden;background:#fff;box-shadow:var(--shadow)}
.fact{display:flex;flex-direction:column;gap:3px;padding:15px 20px;border-bottom:1px solid var(--border)}
.fact:nth-child(odd){border-right:1px solid var(--border)}
.fact .k{font-size:11px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;color:var(--accent-text)}
.fact .v{font-size:15px;font-weight:600;color:var(--navy)}
.fact .cite{font-size:11.5px;color:var(--muted)}
@media(max-width:680px){.facts{grid-template-columns:1fr}.fact:nth-child(odd){border-right:none}}

/* Flow diagram */
.flow{display:flex;align-items:stretch;gap:10px;flex-wrap:wrap;margin-top:6px}
.flow .node{flex:1 1 150px;background:#fff;border:1px solid var(--border);border-radius:13px;padding:14px 15px;box-shadow:var(--shadow);position:relative}
.flow .node b{display:block;color:var(--navy);font-family:var(--serif);font-size:15px;margin-bottom:3px}
.flow .node span{font-size:12.5px;color:var(--muted)}
.flow .arrow{align-self:center;color:var(--accent);font-weight:800;font-size:20px}
.flow .node.hub{background:linear-gradient(180deg,#fff,var(--soft-orange));border-color:#f3d3bd}
.flow .node.bridge{background:linear-gradient(180deg,#fff,var(--soft-yellow));border-color:#efe2ad}

/* Roadmap */
.road{display:grid;grid-template-columns:repeat(2,1fr);gap:14px}
@media(max-width:760px){.road{grid-template-columns:1fr}}
.phase{display:flex;gap:14px;background:#fff;border:1px solid var(--border);border-radius:14px;padding:16px 18px;box-shadow:var(--shadow)}
.phase .pn{font-family:var(--serif);font-weight:700;font-size:22px;color:var(--accent);min-width:34px}
.phase h4{font-size:16px;margin-bottom:3px}
.phase p{font-size:13px;color:var(--muted)}
.badge{display:inline-block;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;padding:3px 9px;border-radius:999px;margin-top:8px}
.b-done{background:#e7f6ee;color:var(--green)} .b-now{background:#fdeee6;color:var(--accent-text)} .b-block{background:#fdeef0;color:var(--red)} .b-wait{background:#eef0f6;color:var(--navy)}
.phase.is-now{border-color:#f1c4a6;background:linear-gradient(180deg,#fff,var(--soft-orange))}

/* Tables */
.tbl-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:14px;box-shadow:var(--shadow);background:#fff}
table{border-collapse:collapse;width:100%;font-size:13.5px;min-width:620px}
thead th{background:var(--navy);color:#fff;text-align:left;font-family:var(--sans);font-weight:600;font-size:12px;letter-spacing:.03em;padding:11px 14px}
td{padding:10px 14px;border-bottom:1px solid var(--border);vertical-align:top}
tbody tr:nth-child(even){background:var(--neutral-50)}
.grp td{background:#eef1f7;font-weight:700;color:var(--navy);font-family:var(--serif);font-size:13px;letter-spacing:.02em}
code,.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;background:#f1f1f5;padding:1px 5px;border-radius:5px;color:#33363f}
.st{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:11.5px;white-space:nowrap}
.st::before{content:"";width:9px;height:9px;border-radius:50%}
.st.ok{color:var(--green)} .st.ok::before{background:var(--green)}
.st.partial{color:#8a5304} .st.partial::before{background:var(--accent2)}
.st.gap{color:var(--red)} .st.gap::before{background:var(--red)}
.st.const{color:var(--navy)} .st.const::before{background:var(--navy)}
.st.verify{color:#6b3fa0} .st.verify::before{background:#7a4fb5}

.legend{display:flex;flex-wrap:wrap;gap:14px;margin:14px 0 4px;font-size:12.5px}
.legend span{display:inline-flex;align-items:center;gap:7px;color:var(--muted)}

/* Callout */
.note{border-radius:13px;padding:15px 18px;font-size:13.5px;display:flex;gap:12px;align-items:flex-start}
.note .ic{font-size:18px;line-height:1}
.note.info{background:#eef4fb;border:1px solid #cfe0f1;color:#234b73}
.note.warn{background:var(--soft-yellow);border:1px solid #efe2ad;color:#6b5900}
.note.good{background:#e9f7f0;border:1px solid #b8e6cc;color:#0a5c34}
.note b{color:inherit}

/* Pill list / glossary */
.gloss{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media(max-width:760px){.gloss{grid-template-columns:1fr}}
.term{background:#fff;border:1px solid var(--border);border-radius:11px;padding:12px 15px;box-shadow:var(--shadow)}
.term b{color:var(--navy);font-family:var(--serif);font-size:14.5px}
.term span{display:block;color:var(--muted);font-size:13px;margin-top:2px}

/* Two-col state lists */
.state{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
@media(max-width:900px){.state{grid-template-columns:1fr}}
.state .card h4{font-size:15.5px;margin-bottom:10px;display:flex;align-items:center;gap:8px}
.state ul{list-style:none;display:flex;flex-direction:column;gap:9px}
.state li{font-size:13.5px;color:#2c2f36;padding-left:22px;position:relative}
.state li::before{position:absolute;left:0;top:0}
.state .done li::before{content:"✓";color:var(--green);font-weight:800}
.state .now li::before{content:"▸";color:var(--accent);font-weight:800}
.state .wait li::before{content:"○";color:var(--muted)}

/* Accordion */
.faq details{background:#fff;border:1px solid var(--border);border-radius:12px;margin-bottom:10px;box-shadow:var(--shadow);overflow:hidden}
.faq summary{cursor:pointer;list-style:none;padding:15px 18px;font-family:var(--serif);font-weight:700;color:var(--navy);font-size:16px;display:flex;gap:12px;align-items:center}
.faq summary::-webkit-details-marker{display:none}
.faq summary::before{content:"+";color:var(--accent);font-size:20px;font-weight:700;width:18px}
.faq details[open] summary::before{content:"–"}
.faq .ans{padding:0 18px 16px 48px;color:#33363f;font-size:14px}
.faq .ans p{margin-bottom:8px}

/* GDB schema list */
.schema{display:grid;grid-template-columns:1fr;gap:8px}
.col{display:grid;grid-template-columns:200px 1fr;gap:14px;background:#fff;border:1px solid var(--border);border-radius:11px;padding:11px 16px;box-shadow:var(--shadow)}
.col .cn{font-weight:700;color:var(--navy);font-size:14px}
.col .ct{font-size:11px;color:var(--accent-text);font-weight:600;text-transform:uppercase;letter-spacing:.04em;margin-top:2px}
.col .cd{font-size:13px;color:var(--muted)}
@media(max-width:680px){.col{grid-template-columns:1fr}}

/* Footer */
footer{background:var(--primary-600);color:#fff;padding:0}
footer .inner{padding:34px 0 26px}
footer .cols{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:24px}
@media(max-width:760px){footer .cols{grid-template-columns:1fr}}
footer h5{font-family:var(--serif);font-size:16px;margin-bottom:10px;color:#fff}
footer a{color:#ffe1d9;font-size:13.5px;display:block;margin-bottom:7px}
footer a:hover{color:#fff}
footer p{font-size:13px;color:#ffd9d0}
footer .bottom{border-top:1px solid rgba(255,255,255,.22);margin-top:24px;padding-top:16px;font-size:12.5px;color:#ffd2c8;display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px}

.kbd{font-family:ui-monospace,monospace;font-size:11px;background:#fff;border:1px solid var(--border);border-bottom-width:2px;border-radius:5px;padding:1px 6px;color:#444}

/* ════════ v2 — closer to bhutan.eregistrations.dev ════════ */

/* Centered section headers with a round number badge */
.sec-head{flex-direction:column;align-items:center;text-align:center;gap:12px;margin-bottom:6px}
.sec-num{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--soft-orange);border:1px solid #f0d4bf;color:var(--accent-text);font-family:var(--sans);font-weight:700;font-size:13px}
.sec-head h2{font-size:31px}
.sec-sub{text-align:center;margin:8px auto 26px}

/* Full-bleed alternating section bands */
main > section{background:#fff}
#what,#roadmap,#service,#mapping,#codelists,#faq{background:var(--surface)}

/* Compact hero (Lesotho-brief style) */
.hero{position:relative;overflow:hidden;border-bottom:none;padding:0;color:#fff;
  background:radial-gradient(680px 300px at 88% -25%,rgba(232,97,26,.26),transparent 60%),
             linear-gradient(135deg,#2a3358 0%,#323e72 100%)}
.hero .wrap{position:relative;z-index:3;padding:46px 22px 52px}
.hero .eyebrow{color:#c9d2ff}
.hero .eyebrow::before{background:var(--flag-yellow)}
.hero h1{color:#fff;font-size:40px;font-weight:300;max-width:18ch;letter-spacing:-.015em;margin:14px 0 12px}
.hero h1 b{font-weight:800;color:#fff}
.hero .lede{color:#d9def0;font-size:16px;max-width:62ch;font-weight:400}
.hero .lede b{color:#fff;font-weight:600}
.hero-meta{margin-top:18px;font-size:12.5px;color:#aeb7da;font-weight:500;letter-spacing:.01em}
@media(max-width:600px){.hero h1{font-size:29px}.hero .wrap{padding:34px 22px 40px}}

/* Pill buttons */
.btn,.btn-primary,.btn-ghost,.btn-outline{border-radius:999px}
.hero-actions .btn-primary{padding:13px 24px;font-size:15px;box-shadow:0 12px 26px rgba(243,95,63,.38)}
.hero-actions .btn-outline{background:rgba(255,255,255,.10);border-color:rgba(255,255,255,.42);color:#fff}
.hero-actions .btn-outline:hover{background:rgba(255,255,255,.2);color:#fff;border-color:#fff}

/* Saffron process band */
.process-band{background:linear-gradient(180deg,#e8611a,#d4530f);color:#fff;padding:42px 0}
.process-band h3{color:#fff;text-align:center;font-size:25px;margin-bottom:6px}
.process-band .ptag{text-align:center;color:#ffe6d6;font-size:14px;margin:0 auto 28px;max-width:62ch}
.steps{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;align-items:flex-start}
.step{flex:1 1 150px;max-width:200px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.step .num{width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:rgba(255,255,255,.15);border:2px solid rgba(255,255,255,.7);font-family:var(--serif);font-weight:700;font-size:19px}
.step b{font-size:15px}
.step span{font-size:12.5px;color:#ffe6d6;line-height:1.45}

/* Stat band */
.band-stat{background:radial-gradient(700px 320px at 18% 0%,rgba(255,204,0,.20),transparent),linear-gradient(120deg,#c42d1a,#e8611a);color:#fff;padding:44px 0}
.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;text-align:center}
@media(max-width:760px){.stats{grid-template-columns:repeat(2,1fr)}}
.stats .stat b{display:block;font-family:var(--serif);font-weight:700;font-size:44px;line-height:1}
.stats .stat span{font-size:13px;color:#ffe2d6;margin-top:8px;display:block}

/* Icon badge on cards */
.iconbadge{width:40px;height:40px;border-radius:12px;display:inline-grid;place-items:center;background:var(--soft-orange);font-size:19px;border:1px solid #f1d8c6;margin-bottom:10px}

@media print{
  .topbar{position:static;box-shadow:none}.topnav,.hero-actions,.btn{display:none}
  body{background:#fff;font-size:12px}section{padding:18px 0;break-inside:avoid}
  .card,.facts,.tbl-wrap,.phase,.term{box-shadow:none}
  a{color:var(--ink)}
  .hero{background:#fff;color:var(--ink)}.hero h1,.hero .lede,.hero .lede b{color:var(--ink)}
  .process-band,.band-stat{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
</style>
</head>
<body>

<!-- ░░ TOP BAR ░░ -->
<header class="topbar">
  <div class="wrap">
    <div class="brand">
      <span class="emblem" aria-hidden="true">🐲</span>
      <span>ePhyto&nbsp;Bhutan<small>BAFRA · Royal Government of Bhutan</small></span>
    </div>
    <nav class="topnav" aria-label="Section navigation">
      <a href="#what">What it is</a>
      <a href="#glossary">Glossary</a>
      <a href="#roadmap">Roadmap</a>
      <a href="#flow">Data flow</a>
      <a href="#datamodel">Data model</a>
      <a href="#mapping">Field mapping</a>
      <a href="#state">Where we are</a>
      <a href="ephyto-qa.html" target="_blank" rel="noopener">Q&amp;A&nbsp;↗</a>
    </nav>
    <button type="button" class="btn btn-ghost" onclick="window.print()">⎙ Print</button>
  </div>
</header>

<!-- ░░ HERO ░░ -->
<div class="hero">
  <div class="wrap">
    <span class="eyebrow">Phytosanitary Certificate · Export · Briefing</span>
    <h1><b>Certified plants</b> ready for export.</h1>
    <p class="lede">How Bhutan's electronic phytosanitary certificate (<b>ePhyto</b>) connects to the global <b>IPPC</b> (International Plant Protection Convention) ePhyto Hub — what it collects, and where the work stands.</p>
    <div class="hero-actions">
      <a class="btn btn-primary" href="#what">Start the briefing ▸</a>
      <a class="btn-outline" href="#mapping">Jump to field mapping</a>
    </div>
    <p class="hero-meta">WIP service · published v16 · bhutan-staging · target UN/CEFACT SPSCertificate XML (schema 17A)</p>
  </div>
</div>

<main>
<!-- ░░ AT A GLANCE ░░ -->
<section id="facts">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">00</span><h2>At a glance</h2></div>
    <p class="sec-sub">The key facts of the service and its Hub integration, before any detail. Use this as your reference card.</p>
    <div class="facts">
      <div class="fact"><span class="k">Service</span><span class="v">Phytosanitary certificate (export of plants &amp; plant products)</span><span class="cite">BPA (Business Process Analyzer) WIP copy · <span class="mono">522c7dc1…</span></span></div>
      <div class="fact"><span class="k">Issuing authority (NPPO)</span><span class="v">BAFRA — Bhutan Agriculture &amp; Food Regulatory Authority</span><span class="cite">NPPO = National Plant Protection Organization</span></div>
      <div class="fact"><span class="k">Hub operator</span><span class="v">IPPC Secretariat (FAO, Rome) + UNICC</span><span class="cite">FAO = UN Food &amp; Agriculture Organization · UNICC = United Nations International Computing Centre (also Certificate Authority)</span></div>
      <div class="fact"><span class="k">Message format</span><span class="v">UN/CEFACT <span class="mono">SPSCertificate</span> XML</span><span class="cite">UN/CEFACT = UN Centre for Trade Facilitation &amp; Electronic Business · SPS = Sanitary &amp; PhytoSanitary · schema 17A</span></div>
      <div class="fact"><span class="k">Content standard</span><span class="v">ISPM 12</span><span class="cite">International Standard for Phytosanitary Measures No. 12 — defines cert content &amp; legal e-equivalence</span></div>
      <div class="fact"><span class="k">Connection</span><span class="v">Hub web service · SOAP + mutual TLS</span><span class="cite">X.509 digital certificates from UNICC</span></div>
      <div class="fact"><span class="k">Data source for the XML</span><span class="v">GDB&#8209;EXPORT database, version 5.8</span><span class="cite">GDB = Generic Database · read by record/file ID · 20 records today</span></div>
      <div class="fact"><span class="k">Scope (v1)</span><span class="v">Outbound export certificates</span><span class="cite">Inbound receive = future extension</span></div>
    </div>
  </div>
</section>

<!-- ░░ WHAT IT IS ░░ -->
<section id="what">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">01</span><h2>What ePhyto and the Hub actually are</h2></div>
    <p class="sec-sub">The one-paragraph version you can say out loud, plus the routing picture.</p>
    <div class="grid g2">
      <div class="card">
        <p style="margin-bottom:10px">A <b>phytosanitary certificate</b> is the official document a country's plant-protection authority issues to confirm a shipment of plants or plant products was inspected, is free of pests, and meets the importing country's rules. <b>ePhyto</b> is its electronic form.</p>
        <p>The <b>IPPC ePhyto Hub</b> is a central exchange run by the IPPC Secretariat with UNICC. Instead of every country building a connection to every trading partner, each country connects <em>once</em> to the Hub, which then routes certificates between countries — carried as a standardised <span class="mono">SPSCertificate</span> XML message.</p>
      </div>
      <div class="card" style="display:flex;flex-direction:column;justify-content:center;background:linear-gradient(180deg,#fff,var(--surface))">
        <div class="flow">
          <div class="node"><b>BAFRA</b><span>Bhutan exporter side · eRegistrations</span></div>
          <div class="arrow">→</div>
          <div class="node hub"><b>IPPC ePhyto Hub</b><span>central router (UNICC)</span></div>
          <div class="arrow">→</div>
          <div class="node"><b>Partner NPPO</b><span>India · Thailand · Bangladesh…</span></div>
        </div>
        <p style="font-size:12.5px;color:var(--muted);margin-top:14px">Bhutan is <b>not</b> using GeNS (IPPC's free off-the-shelf system) — it has its own national system (eRegistrations), which is why this is a direct system-to-Hub integration.</p>
      </div>
    </div>
  </div>
</section>

<!-- ░░ GLOSSARY ░░ -->
<section id="glossary">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">02</span><h2>Acronym &amp; vocabulary</h2></div>
    <p class="sec-sub">Every term an ePhyto expert will use in the room.</p>
    <div class="gloss">
      <div class="term"><b>IPPC</b><span>International Plant Protection Convention — the FAO treaty body (Rome) that owns the phytosanitary standard and runs the Hub.</span></div>
      <div class="term"><b>NPPO</b><span>National Plant Protection Organization — the agency that issues certificates. Bhutan's is <b>BAFRA</b>.</span></div>
      <div class="term"><b>UNICC</b><span>UN International Computing Centre — operates the Hub infrastructure and signs the X.509 certificates (acts as Certificate Authority).</span></div>
      <div class="term"><b>GeNS</b><span>Generic ePhyto National System — IPPC's free web app for countries with no system. Bhutan does <em>not</em> use it.</span></div>
      <div class="term"><b>UN/CEFACT SPSCertificate</b><span>UN Centre for Trade Facilitation &amp; Electronic Business · SPS = Sanitary &amp; PhytoSanitary. The XML message format certificates travel in. "Mapping to the Hub" = emitting this exact shape.</span></div>
      <div class="term"><b>BPA</b><span>Business Process Analyzer — the no-code tool where the eRegistrations service (forms, roles, bots) is designed.</span></div>
      <div class="term"><b>GDB</b><span>Generic Database — the eRegistrations database where the finished certificate record is stored (here, the GDB&#8209;EXPORT database).</span></div>
      <div class="term"><b>ISPM 12</b><span>The IPPC standard defining certificate content and the legal equivalence of an authenticated ePhyto to paper + signature + seal.</span></div>
      <div class="term"><b>Mapping Guide v2.12 / schema 17A</b><span>The XML tag authority and current schema baseline the Hub validator expects.</span></div>
      <div class="term"><b>UAT</b><span>User Acceptance Testing — the Hub's test environment where you exchange dummy certificates with a partner before going live.</span></div>
      <div class="term"><b>X.509 certificate</b><span>A digital "passport" (public cert + private key) proving a connection really belongs to Bhutan's NPPO.</span></div>
      <div class="term"><b>SOAP / WSDL / mutual TLS</b><span>The Hub's connection technology: SOAP web services described by a WSDL, secured by both sides presenting certificates.</span></div>
      <div class="term"><b>ISO 3166-1 alpha-2</b><span>Two-letter country codes (BT = Bhutan). Required for all country fields in the XML.</span></div>
      <div class="term"><b>UN/LOCODE</b><span>UN location codes for ports / points of entry.</span></div>
      <div class="term"><b>EPPO</b><span>European &amp; Mediterranean Plant Protection Organization — source of scientific (botanical) plant names; sent as free text.</span></div>
      <div class="term"><b>TTL1 / TTL2 · TTFT · ZZZ</b><span>Treatment type level 1 / level 2 codes · the mandatory full-treatment text · the fixed Hub process-type code used whenever a treatment is present.</span></div>
    </div>
  </div>
</section>

<!-- ░░ ROADMAP ░░ -->
<section id="roadmap">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">03</span><h2>The 8-phase integration roadmap</h2></div>
    <p class="sec-sub">The standard path every country follows to join the Hub — with Bhutan's current position marked on each phase.</p>
    <div class="road">
      <div class="phase"><div class="pn">1</div><div><h4>Authorisation &amp; Hub onboarding</h4><p>BAFRA formally asks IPPC to join; obtains UAT access and X.509 certificates from UNICC. Diplomatic, ~2–4 weeks, runs in parallel.</p><span class="badge b-wait">BAFRA-led · pending</span></div></div>
      <div class="phase is-now"><div class="pn">2</div><div><h4>Map fields to the Hub XML</h4><p>Match every form field to its <span class="mono">SPSCertificate</span> path and the right code list. Identify gaps.</p><span class="badge b-done">Largely done</span></div></div>
      <div class="phase is-now"><div class="pn">3</div><div><h4>Fill form gaps &amp; align code lists</h4><p>Add missing fields and load IPPC code lists (commodity, treatment, package, UOM, country, AD). Most landed; a few alignments remain.</p><span class="badge b-now">In progress</span></div></div>
      <div class="phase"><div class="pn">4</div><div><h4>Build the XML transformer</h4><p>Turn an approved GDB&#8209;EXPORT record into valid <span class="mono">SPSCertificate</span> XML, validated against the Hub's <span class="mono">ValidatePhytoXML</span> service.</p><span class="badge b-now">Next — not started</span></div></div>
      <div class="phase"><div class="pn">5</div><div><h4>Wire up the Hub web-service call</h4><p>Connect to the Hub's web service from its WSDL (Web Services Description Language); send signed XML and receive responses over mutual TLS.</p><span class="badge b-wait">Pending phase 4</span></div></div>
      <div class="phase"><div class="pn">6</div><div><h4>Integrate into the workflow</h4><p>Auto-send to the Hub at final approval; write the acknowledgement back onto the file.</p><span class="badge b-wait">Pending</span></div></div>
      <div class="phase"><div class="pn">7</div><div><h4>UAT with a partner country</h4><p>Exchange test certificates end-to-end; obtain IPPC/UNICC sign-off.</p><span class="badge b-wait">Pending certs</span></div></div>
      <div class="phase"><div class="pn">8</div><div><h4>Go live &amp; monitor</h4><p>Switch to production Hub; monitor traffic, acknowledgements, rejections.</p><span class="badge b-wait">Pending</span></div></div>
    </div>
  </div>
</section>

<!-- ░░ DATA FLOW / ARCHITECTURE ░░ -->
<section id="flow">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">04</span><h2>How the data flows</h2></div>
    <p class="sec-sub">The deliberate design: the Hub connection lives in a dedicated <b>integration layer</b>, so the certificate's form and workflow never have to speak <b>SOAP</b> (Simple Object Access Protocol) or manage certificates.</p>
    <div class="card" style="margin-bottom:16px">
      <div class="flow">
        <div class="node"><b>Applicant + Inspector</b><span>fill the form; inspection recorded</span></div>
        <div class="arrow">→</div>
        <div class="node"><b>Certificate generated</b><span>PDF + record</span></div>
        <div class="arrow">→</div>
        <div class="node"><b>GDB&#8209;EXPORT v5.8</b><span>structured record written by the "DB create" bot</span></div>
        <div class="arrow">→</div>
        <div class="node bridge"><b>Integration layer</b><span>reads by ID → transforms to SPSCertificate XML</span></div>
        <div class="arrow">→</div>
        <div class="node hub"><b>IPPC Hub</b><span>SOAP web service · mutual TLS · X.509</span></div>
      </div>
    </div>
    <div class="note info"><span class="ic">ℹ️</span><div><b>Why a separate integration layer?</b> The XML has nested, repeating, conditional structure and needs a <b>SOAP</b> web-service call over <b>mutual TLS</b> (Transport Layer Security, where both sides present a certificate) plus <b>X.509</b> certificate management. Keeping that in a dedicated layer means it reads the finished record straight from GDB&#8209;EXPORT, validates against the Hub's <span class="mono">ValidatePhytoXML</span> before sending, and can <b>retry a failed send without re-running the whole workflow</b>.</div></div>
  </div>
</section>

<!-- ░░ THE SERVICE ITSELF ░░ -->
<section id="service">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">05</span><h2>The service itself</h2></div>
    <p class="sec-sub">390 fields across the applicant and inspector forms, an 8-step process, and 6 automation bots. Here's the shape.</p>
    <div class="grid g3" style="margin-bottom:18px">
      <div class="card"><span class="iconbadge">📋</span><h4 style="font-size:16px;margin-bottom:10px">Form blocks (applicant)</h4>
        <ul style="list-style:none;font-size:13.5px;display:flex;flex-direction:column;gap:7px;color:#2c2f36">
          <li>▪ Application form</li>
          <li>▪ Exporter details — individual</li>
          <li>▪ Exporter details — commercial</li>
          <li>▪ Exporter details — institution</li>
          <li>▪ Details of consignee</li>
          <li>▪ Commodity details <em>(table, one row per commodity)</em></li>
          <li>▪ Shipment / logistics (exit point, conveyance, purpose)</li>
        </ul>
        <p style="font-size:12px;color:var(--muted);margin-top:10px">The richest design lives on the <b>Inspector form</b> — inspection report grid, pest information grid, treatment block, and the coded <b>Additional Declarations</b> edit grid.</p>
      </div>
      <div class="card"><span class="iconbadge">🛂</span><h4 style="font-size:16px;margin-bottom:10px">Process (roles)</h4>
        <ul style="list-style:none;font-size:13.5px;display:flex;flex-direction:column;gap:7px;color:#2c2f36">
          <li><b>1.</b> Officer-in-charge <span style="color:var(--muted)">— reviews, assigns</span></li>
          <li><b>2.</b> Inspector <span style="color:var(--muted)">— inspects, records</span></li>
          <li><b>3.</b> Make payment</li>
          <li><b>4.</b> Create Phytosanitary DB <span style="color:var(--accent)">⚙ bot</span></li>
          <li><b>5.</b> Generate Certificate <span style="color:var(--accent)">⚙ bot</span></li>
          <li style="color:var(--muted)">+ two "Problem…" fallbacks &amp; Applicant</li>
        </ul>
      </div>
      <div class="card"><span class="iconbadge">⚙️</span><h4 style="font-size:16px;margin-bottom:10px">Automation (bots)</h4>
        <ul style="list-style:none;font-size:13.5px;display:flex;flex-direction:column;gap:7px;color:#2c2f36">
          <li>▪ CID details fetch</li>
          <li>▪ Business licence read</li>
          <li><b>▪ Phytosanitary DB create</b> <span style="color:var(--muted)">→ GDB&#8209;EXPORT</span></li>
          <li>▪ Phyto certificate generate <span style="color:var(--muted)">(PDF)</span></li>
          <li>▪ Send email with cert</li>
          <li>▪ ePhyto certificate URL</li>
        </ul>
        <p style="font-size:12px;color:var(--muted);margin-top:10px">The integration layer will read what <b>Phytosanitary DB create</b> writes — no new bot needed.</p>
      </div>
    </div>

    <div class="card" style="margin-top:4px;background:linear-gradient(180deg,#fff,var(--soft-orange))">
      <h4 style="font-size:17px;margin-bottom:8px">What the inspector actually does — and why a field like “Number and description of packages” exists</h4>
      <p style="font-size:14px;color:#33363f;margin-bottom:12px">After the Officer-in-charge accepts the application, the file passes to an <b>inspector</b> — a BAFRA plant-health officer who <b>physically examines the shipment</b> before any certificate can be issued. The exporter's application is only a <em>request</em>; the inspector's record is what actually gets <em>certified</em>. That is why most of the certificate's content is entered or confirmed by the inspector, not the applicant.</p>
      <div class="grid g2">
        <div>
          <p style="font-size:13.5px;color:#33363f;margin-bottom:6px"><b>On the inspector form they record what they see:</b></p>
          <ul style="font-size:13.5px;color:#2c2f36;padding-left:18px;display:flex;flex-direction:column;gap:6px">
            <li><b>Number &amp; description of packages</b> — e.g. “200 fibreboard cartons”. A counted, eyes-on fact that lets the importing country match the paperwork to the physical shipment. <span class="mono">inspectionNoAndDescriptionOfPackages</span></li>
            <li>Botanical name &amp; quantity, for each commodity</li>
            <li>Any pests or disease found (the pest-information grid)</li>
            <li>Treatment applied — type, chemical, duration, temperature</li>
            <li><b>Additional declarations</b> — special statements the importing country demands</li>
            <li>The decision: <b>approve or reject</b>, per commodity</li>
          </ul>
        </div>
        <div class="note info" style="align-self:start"><span class="ic">💡</span><div><b>Why the inspector fills the packages field, not the exporter:</b> the number and kind of packages can only be confirmed by counting the actual goods at inspection. Because it is <em>verified</em>, it is allowed onto the official certificate — which is the entire reason the field exists. An exporter's guess could not be certified.</div></div>
      </div>
    </div>
  </div>
</section>

<!-- ░░ DATA MODEL ░░ -->
<section id="datamodel">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">06</span><h2>The data model — consignment, commodity, package &amp; treatment</h2></div>
    <p class="sec-sub">If you remember one picture from this briefing, make it this one. The Hub XML, the GDB&#8209;EXPORT database, and the form all share exactly this nesting — and most confusion comes from mixing up these four words.</p>
    <div class="grid g2">
      <div class="card">
        <pre style="font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12.5px;line-height:1.75;background:var(--neutral-50);border:1px solid var(--border);border-radius:10px;padding:16px;overflow-x:auto;color:#2c2f36;margin:0"><b style="color:var(--navy)">CONSIGNMENT</b>  <span style="color:var(--muted)">— one shipment = one certificate</span>
 │  one exporter → one consignee, one importing country
 │  transport · point of entry · transit countries
 │
 ├─ <b style="color:var(--accent-text)">COMMODITY 1</b>  <span style="color:var(--muted)">e.g. Apples</span>
 │   ├─ <b style="color:var(--green)">packages</b>    200 cartons
 │   ├─ <b style="color:#6b3fa0">treatment</b>   cold, 1°C, 14 days
 │   └─ quantity · botanical name · origin
 │
 ├─ <b style="color:var(--accent-text)">COMMODITY 2</b>  <span style="color:var(--muted)">e.g. Oranges</span>
 │   ├─ <b style="color:var(--green)">packages</b>    80 crates
 │   └─ <b style="color:#6b3fa0">treatment</b>   fumigation
 │
 └─ <b style="color:#b06a06">NOTES</b>  →  additional declarations · distinguishing marks</pre>
      </div>
      <div class="card">
        <h4 style="font-size:16px;margin-bottom:8px">In plain words</h4>
        <p style="font-size:14px;color:#33363f;margin-bottom:10px">One certificate covers one <b>consignment</b> — the whole shipment going from one exporter to one consignee in one destination country. Think of it as the container-load this certificate is about.</p>
        <p style="font-size:14px;color:#33363f;margin-bottom:10px">Inside it are one or more <b>commodities</b> — the distinct products. Apples are one commodity, oranges another. Each commodity is <b>one row</b> in the commodity table (the XML calls it a “trade line item”).</p>
        <p style="font-size:14px;color:#33363f">Each commodity carries its own <b>packages</b> (how that product is boxed) and its own <b>treatment</b> (any pest treatment applied to it). Spanning the whole consignment are the <b>notes</b> — additional declarations and distinguishing marks.</p>
      </div>
    </div>
    <div class="note warn" style="margin-top:14px"><span class="ic">⚠️</span><div><b>The four words people mix up:</b> <b>consignment</b> = the whole shipment (one certificate) · <b>commodity</b> = one product line within it · <b>package</b> = how a commodity is physically boxed (not the product itself) · <b>treatment</b> = a pest treatment applied to a commodity. This nesting is <em>why</em> the treatment <em>type</em> (level 1 / 2, duration, temperature) now sits <em>per row</em> inside the commodity table, so each product can be treated differently — though the chemical, concentration and treatment-date detail still live in one shared treatment block — and why packages should be structured <em>per commodity</em> rather than one free-text blob.</div></div>
  </div>
</section>

<!-- ░░ FIELD MAPPING ░░ -->
<section id="mapping">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">07</span><h2>Field mapping &amp; gaps</h2></div>
    <p class="sec-sub">Each form field → its place in the <span class="mono">SPSCertificate</span> XML → the code list it needs → status. This is the heart of the discussion. <b>The crucial distinction:</b> a true <em>form gap</em> (a field to add) is very different from a value the <em>integration layer sets as a constant by design</em>.</p>

    <div class="legend">
      <span><span class="st ok"></span>Mapped &amp; flowing</span>
      <span><span class="st partial"></span>Mapped — needs code-list alignment / transform at send</span>
      <span><span class="st gap"></span>Form gap — a field still to add</span>
      <span><span class="st const"></span>Set by the integration layer (by design — no form field)</span>
      <span><span class="st verify"></span>Verify wiring</span>
    </div>

    <div class="tbl-wrap" style="margin-top:14px">
      <table>
        <thead><tr><th style="width:24%">Certificate data</th><th style="width:30%">SPSCertificate path</th><th style="width:22%">Code list</th><th style="width:24%">Status</th></tr></thead>
        <tbody>
          <tr class="grp"><td colspan="4">Document &amp; issuer (SPSExchangedDocument)</td></tr>
          <tr><td>Certificate number</td><td><span class="mono">SPSExchangedDocument.ID</span></td><td>—</td><td><span class="st ok">Mapped</span></td></tr>
          <tr><td><b>Certificate type</b> (851 export / 657 re-export)</td><td><span class="mono">.TypeCode</span></td><td>IPPC document type</td><td><span class="st partial">Selector exists (Export / Re-export) — re-code to 851 / 657</span></td></tr>
          <tr><td>Issuing NPPO name</td><td><span class="mono">IssuerSPSParty.Name</span></td><td>—</td><td><span class="st const">Constant "BAFRA"</span></td></tr>
          <tr><td>Issue date</td><td><span class="mono">IssueDateTime</span></td><td>—</td><td><span class="st ok">Mapped</span></td></tr>
          <tr><td>Status code</td><td><span class="mono">.StatusCode</span></td><td>IPPC status (70/71/72)</td><td><span class="st const">Constant 70</span></td></tr>
          <tr><td>Certifying statement clause</td><td><span class="mono">IncludedSPSClause</span></td><td>IPPC SPS clause (1/2)</td><td><span class="st const">Constant 1 (/2 re-export)</span></td></tr>
          <tr><td>Authorized officer / signature</td><td><span class="mono">SignatorySPSAuthentication</span></td><td>—</td><td><span class="st ok">Mapped</span></td></tr>

          <tr class="grp"><td colspan="4">Consignment — geography (SPSConsignment)</td></tr>
          <tr><td>Exporting country</td><td><span class="mono">ExportSPSCountry.ID</span></td><td>ISO 3166-1 α-2</td><td><span class="st const">Constant "BT"</span></td></tr>
          <tr><td>Importing country</td><td><span class="mono">ImportSPSCountry.ID</span></td><td>ISO 3166-1 α-2</td><td><span class="st partial">Align catalog → ISO</span></td></tr>
          <tr><td>Transit country</td><td><span class="mono">TransitSPSCountry.ID</span></td><td>ISO 3166-1 α-2</td><td><span class="st partial">Added (optional)</span></td></tr>
          <tr><td>Country / place of origin</td><td><span class="mono">OriginSPSCountry.ID</span></td><td>ISO 3166-1 α-2</td><td><span class="st partial">Align catalog → ISO</span></td></tr>
          <tr><td>Point of entry</td><td><span class="mono">UnloadingBaseportSPSLocation</span></td><td>UN/LOCODE</td><td><span class="st partial">UN/LOCODE pending</span></td></tr>
          <tr><td>Means of conveyance</td><td><span class="mono">MainCarriageSPSTransportMovement</span></td><td>IPPC transport modes</td><td><span class="st partial">Align to IPPC modes</span></td></tr>

          <tr class="grp"><td colspan="4">Parties — exporter &amp; consignee</td></tr>
          <tr><td>Exporter name / address / ID</td><td><span class="mono">ConsignorSPSParty</span></td><td>—</td><td><span class="st partial">Coalesce 4 sources / split address</span></td></tr>
          <tr><td>Consignee name &amp; address</td><td><span class="mono">ConsigneeSPSParty</span></td><td>—</td><td><span class="st ok">Mapped</span></td></tr>

          <tr class="grp"><td colspan="4">Commodities — per row (IncludedSPSTradeLineItem)</td></tr>
          <tr><td>Produce description</td><td><span class="mono">.Description</span></td><td>—</td><td><span class="st ok">Mapped</span></td></tr>
          <tr><td>Botanical / scientific name</td><td><span class="mono">ScientificName</span></td><td>EPPO (free text)</td><td><span class="st ok">Mapped</span></td></tr>
          <tr><td>Commodity class</td><td><span class="mono">ApplicableSPSClassification</span></td><td>IPPC product description</td><td><span class="st partial">Align to IPPC</span></td></tr>
          <tr><td>Quantity &amp; unit</td><td><span class="mono">NetWeight/NetVolumeMeasure</span></td><td>IPPC UOM</td><td><span class="st partial">Unit → UOM catalog</span></td></tr>
          <tr><td>Intended use</td><td><span class="mono">(intended-use descriptor)</span></td><td>IPPC intended use</td><td><span class="st partial">Align to IPPC</span></td></tr>
          <tr><td>Packages</td><td><span class="mono">PhysicalSPSPackage</span></td><td>IPPC package codes</td><td><span class="st partial">Structure pending</span></td></tr>

          <tr class="grp"><td colspan="4">Treatments — per row (AppliedSPSProcess)</td></tr>
          <tr><td>Treatment date</td><td><span class="mono">CompletionSPSPeriod</span></td><td>W3 date</td><td><span class="st ok">Mapped</span></td></tr>
          <tr><td>Process type</td><td><span class="mono">.TypeCode</span></td><td>fixed ZZZ</td><td><span class="st const">Constant ZZZ</span></td></tr>
          <tr><td>Treatment type L1 / L2</td><td><span class="mono">TTL1 / TTL2</span></td><td>IPPC treatment types</td><td><span class="st ok">Already two fields (L1 / L2)</span></td></tr>
          <tr><td>Chemical · Duration/temp · Concentration</td><td><span class="mono">TTCH · DurationMeasure/TTTM · TTCO</span></td><td>IPPC UOM</td><td><span class="st partial">Parsed at send</span></td></tr>
          <tr><td>Full treatment text</td><td><span class="mono">TTFT</span></td><td>—</td><td><span class="st const">Composed at send (mandatory)</span></td></tr>

          <tr class="grp"><td colspan="4">Notes (IncludedSPSNote)</td></tr>
          <tr><td>Distinguishing marks</td><td><span class="mono">IncludedSPSNote · DMCL</span></td><td>fixed subject code</td><td><span class="st ok">Mapped</span></td></tr>
          <tr><td><b>Additional declarations</b></td><td><span class="mono">IncludedSPSNote · ADEDL/ADTLIL</span></td><td>IPPC AD codes</td><td><span class="st verify">Coded grid exists — verify bot input</span></td></tr>
          <tr><td>Import permit number</td><td><span class="mono">IncludedSPSNote · ADIPEDL</span></td><td>—</td><td><span class="st gap">Form gap — no dedicated field</span></td></tr>
          <tr><td>Inspection date</td><td><span class="mono">IncludedSPSNote · ADDIEDL</span></td><td>—</td><td><span class="st ok">Mapped</span></td></tr>
        </tbody>
      </table>
    </div>

    <div class="note good" style="margin-top:16px"><span class="ic">✅</span><div><b>Correction worth knowing before the call.</b> Earlier notes listed "Additional declarations" as <em>missing</em>. Verified against the live 390-field service, that is <b>not</b> true: the coded Additional Declarations edit grid (Scope · Declaration code · Declaration text + an auto-assembled output) already exists on the Inspector form and already mirrors the GDB array one-to-one. The only open item is confirming its bot <em>input mapping</em> carries the content into GDB&#8209;EXPORT — a verification, not a rebuild.</div></div>

    <div class="note info" style="margin-top:12px"><span class="ic">⚙️</span><div><b>What the integration layer supplies as fixed constants</b> (so don't mistake these for form gaps): Issuer = <span class="mono">BAFRA</span>, Exporting country = <span class="mono">BT</span>, Status = <span class="mono">70</span> (issued), Certifying clause = <span class="mono">1</span> (standard) / <span class="mono">2</span> (re-export), Treatment process type = <span class="mono">ZZZ</span>, and the concatenated mandatory <span class="mono">TTFT</span> full-treatment text. These are deliberate, per the IPPC mapping rules — they are <em>not</em> data an officer should type.</div></div>
  </div>
</section>

<!-- ░░ GDB STRUCTURE ░░ -->
<section id="gdb">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">08</span><h2>The data the integration layer reads — GDB&#8209;EXPORT v5.8</h2></div>
    <p class="sec-sub">One row = one phytosanitary certificate. The integration layer reads a record by ID and maps it to the XML. Verified live: database id 151, code <span class="mono">export</span>, v5.8, 20 records. <em>(Address it by code <span class="mono">export</span> — there is no database literally named "GDB-EXPORT".)</em></p>
    <div class="schema">
      <div class="col"><div><div class="cn">ID</div><div class="ct">string · primary key</div></div><div class="cd">Row primary key — the only mandatory top-level field. The integration layer finds the record by this.</div></div>
      <div class="col"><div><div class="cn">Certificate number</div><div class="ct">string</div></div><div class="cd">Auto-fills from an index and left-pads with zeros when empty.</div></div>
      <div class="col"><div><div class="cn">Issue date</div><div class="ct">date</div></div><div class="cd">Certificate issue date.</div></div>
      <div class="col"><div><div class="cn">Exporter details</div><div class="ct">object</div></div><div class="cd">Applicant type · Name · Identification/licence number · Nationality · Address.</div></div>
      <div class="col"><div><div class="cn">Consignment details</div><div class="ct">object</div></div><div class="cd">Consignee name &amp; address · Importing country · Declared point of entry · <b>Import permit number</b> · Place of origin · Packages · Distinguishing marks · Purpose/end use · Mode of conveyance · <b>Transit country</b> · Conveyance name · Exit point · <b>Additional declarations array</b>.</div></div>
      <div class="col"><div><div class="cn">↳ Additional declarations</div><div class="ct">array of object</div></div><div class="cd">Each: Scope · SAD code (catalog) · Text. Mirrors the inspector AD edit grid exactly.</div></div>
      <div class="col"><div><div class="cn">Commodity details</div><div class="ct">array of object</div></div><div class="cd">One per commodity line: Commodity type · Common name · Botanical name · HS code · Description · Quantity · Quantity unit · Unit of measure (catalog) · Package type (catalog) · <b>Treatment type L1 / L2</b> (catalog) · Treatment duration · Treatment temperature · Export approved · Rejection reason.</div></div>
      <div class="col"><div><div class="cn">Treatment information</div><div class="ct">object</div></div><div class="cd">Treatment date · Treatment · Chemical (active ingredients) · Duration and temperature · Concentration · Additional information.</div></div>
      <div class="col"><div><div class="cn">Approval process</div><div class="ct">object</div></div><div class="cd">Name of OIC · Assigned date / to · Inspected by · Inspection date · Place of inspection · Place of issue.</div></div>
      <div class="col"><div><div class="cn">File Number</div><div class="ct">string</div></div><div class="cd">Links back to the originating eRegistrations file.</div></div>
    </div>
    <div class="note warn" style="margin-top:14px"><span class="ic">🔎</span><div><b>One thing to close:</b> the bot's output coverage doesn't yet emit the record's <span class="mono">uuid</span> (and created/modified timestamps). The integration layer needs the <span class="mono">uuid</span> to locate the GDB record — worth flagging as a wiring item.</div></div>
  </div>
</section>

<!-- ░░ CODE LISTS ░░ -->
<section id="codelists">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">09</span><h2>Authoritative code lists</h2></div>
    <p class="sec-sub">Mismatched codes are the #1 cause of rejected certificates. Every coded field maps to one of these international lists — always cite the source.</p>
    <div class="tbl-wrap">
      <table>
        <thead><tr><th>Code list</th><th>Authority</th><th>Status on the WIP service</th></tr></thead>
        <tbody>
          <tr><td>Country codes — ISO 3166-1 alpha-2</td><td><a href="https://www.iso.org/iso-3166-country-codes.html">ISO</a></td><td><span class="st partial">Country catalog re-keyed to ISO; finish alignment on all country fields</span></td></tr>
          <tr><td>Point of entry — UN/LOCODE</td><td><a href="https://unece.org/trade/cefact/UNLOCODE-Download">UNECE</a></td><td><span class="st gap">Not yet aligned</span></td></tr>
          <tr><td>Unit of measure (UOM)</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Unit_of_Measure_Codes.pdf">IPPC</a></td><td><span class="st ok">Catalog created (49 entries)</span></td></tr>
          <tr><td>Package codes</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Package_Codes.pdf">IPPC</a></td><td><span class="st ok">Catalog created (92 entries)</span></td></tr>
          <tr><td>Treatment types L1 / L2</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Treatment_Types.pdf">IPPC</a></td><td><span class="st ok">Catalogs created (4 / 18)</span></td></tr>
          <tr><td>Additional declaration codes (SAD)</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Codes_for_additional_declarations.pdf">IPPC</a></td><td><span class="st ok">Loaded (ISPM 12 App. 2 · 20)</span></td></tr>
          <tr><td>Modes of transport</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Modes_of_Transport_Codes.pdf">IPPC</a></td><td><span class="st partial">Catalog re-keyed; align to IPPC modes</span></td></tr>
          <tr><td>Product description</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Product_Description.pdf">IPPC</a></td><td><span class="st gap">No matching catalog yet; Commodity-type list exists but is mis-keyed</span></td></tr>
          <tr><td>Intended use</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Intend_Use.pdf">IPPC</a></td><td><span class="st gap">Keys need cleanup &amp; IPPC alignment</span></td></tr>
          <tr><td>Document type (851/657)</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Document_Type_Codes.pdf">IPPC</a></td><td><span class="st const">Selector to add; else default at send</span></td></tr>
          <tr><td>Status codes (70/71/72)</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_Status_Codes.pdf">IPPC</a></td><td><span class="st const">Set at send — no catalog needed</span></td></tr>
          <tr><td>SPS clause codes (1/2)</td><td><a href="https://www.ephytoexchange.org/doc/mapping/IPPC_Specific_SPS_Clause_Codes.pdf">IPPC</a></td><td><span class="st const">Set at send — no catalog needed</span></td></tr>
        </tbody>
      </table>
    </div>
  </div>
</section>

<!-- ░░ WHERE WE ARE ░░ -->
<section id="state">
  <div class="wrap">
    <div class="sec-head"><span class="sec-num">10</span><h2>Where we are today</h2></div>
    <p class="sec-sub">The form and database work is substantially done and published to staging (v16, 4 Jun 2026); the Hub integration layer is the next-leverage build.</p>
    <div class="state">
      <div class="card done"><h4>✅ Done &amp; published (v16)</h4>
        <ul>
          <li>Form restructured: exporter / consignee / commodity / treatment — treatment <em>type</em> (L1 / L2, duration, temperature) per row in the commodity table; chemical / concentration / date in a shared treatment block</li>
          <li>Coded Additional Declarations edit grid on the Inspector form (Scope · code · text + auto-assembled)</li>
          <li>Transit country added</li>
          <li>IPPC catalogs created &amp; populated: UOM, Package, Treatment L1/L2, AD/SAD codes</li>
          <li>Country catalog re-keyed to ISO 3166-1 α-2; mode-of-conveyance catalog re-keyed (IPPC alignment pending)</li>
          <li>GDB&#8209;EXPORT v5.8 with Hub-shaped columns</li>
          <li>"DB create" bot upgraded to 5.8; mappings validate clean</li>
        </ul>
      </div>
      <div class="card now"><h4>▸ In progress / next</h4>
        <ul>
          <li><b>Hub integration layer</b> — read a GDB&#8209;EXPORT record → SPSCertificate XML → submit to the Hub web service over mutual TLS. The highest-leverage build, not yet started</li>
          <li><b>Re-code</b> the existing Export / Re-export selector to IPPC <b>851 / 657</b></li>
          <li>Verify the AD bot <b>input</b> mapping reaches GDB; emit the record <span class="mono">uuid</span> on output</li>
          <li>Finish ISO / IPPC alignment: country fields, modes, product, intended use</li>
          <li>UN/LOCODE for points of entry; clean up intended-use keys</li>
        </ul>
      </div>
      <div class="card wait"><h4>○ Blocked / not our gate</h4>
        <ul>
          <li>Print-document additions (package type per row, structured treatment, transit) — blocked on a tooling timeout</li>
          <li>Pest data model → multi-pest-per-commodity array</li>
          <li><b>BAFRA's X.509 enrolment</b> with IPPC (phase 1) — diplomatic, runs in parallel</li>
          <li>Partner-country UAT (phase 7) — needs the certificates first</li>
        </ul>
      </div>
    </div>
  </div>
</section>

<!-- ░░ FAQ ░░ -->
</main>

<!-- ░░ FOOTER ░░ -->
<div class="flagstripe"></div>
<footer>
  <div class="wrap inner">
    <div class="cols">
      <div>
        <h5>ePhyto Bhutan</h5>
        <p>Phytosanitary certificate (export of plants and plant products) — IPPC ePhyto Hub integration. Prepared as a briefing and explainer for the BAFRA team and ePhyto partners.</p>
        <p style="margin-top:10px">Royal Government of Bhutan · BAFRA</p>
      </div>
      <div>
        <h5>On this page</h5>
        <a href="#what">What it is</a>
        <a href="#glossary">Glossary</a>
        <a href="#roadmap">8-phase roadmap</a>
        <a href="#mapping">Field mapping</a>
        <a href="#state">Where we are</a>
        <a href="ephyto-qa.html" target="_blank" rel="noopener">Q&amp;A ↗</a>
      </div>
      <div>
        <h5>References</h5>
        <a href="https://www.ephytoexchange.org/">IPPC ePhyto Exchange</a>
        <a href="https://www.ippc.int/">IPPC</a>
        <a href="https://www.iso.org/iso-3166-country-codes.html">ISO 3166 country codes</a>
        <a href="https://unece.org/trade/cefact/UNLOCODE-Download">UN/LOCODE</a>
      </div>
    </div>
    <div class="bottom">
      <span>Service: Phytosanitary export certificate (WIP) · bhutan-staging · published v16</span>
      <span>Field-mapping &amp; code-list status verified against the live service · 4 Jun 2026</span>
      <span>Briefing document — internal</span>
    </div>
  </div>
</footer>

<script>
// active-section highlight in top nav — tracks the topmost section under the header
(function(){
  var links=[].slice.call(document.querySelectorAll('.topnav a'));
  if(!links.length||!('IntersectionObserver' in window))return;
  var map={};links.forEach(function(a){map[a.getAttribute('href').slice(1)]=a;});
  var secs=Object.keys(map).map(function(id){return document.getElementById(id);}).filter(Boolean);
  var visible={};
  function paint(){
    var current=null;
    for(var i=0;i<secs.length;i++){ if(visible[secs[i].id]){current=secs[i].id;break;} }
    links.forEach(function(l){l.style.background='';l.style.color='';});
    if(current&&map[current]){map[current].style.background='rgba(255,255,255,.14)';map[current].style.color='#fff';}
    // if nothing is intersecting (in a gap), the previous highlight simply persists
  }
  var obs=new IntersectionObserver(function(es){
    es.forEach(function(e){ visible[e.target.id]=e.isIntersecting; });
    paint();
  },{rootMargin:'-69px 0px -55% 0px',threshold:0});
  secs.forEach(function(s){obs.observe(s);});
})();
</script>
<script>
// Scroll-activated separator under the sticky header (light orange on scroll, invisible at rest)
(function(){
  var tb=document.querySelector('.topbar');if(!tb)return;
  function onScroll(){ if(window.scrollY>4) tb.classList.add('scrolled'); else tb.classList.remove('scrolled'); }
  onScroll(); window.addEventListener('scroll',onScroll,{passive:true});
})();
</script>
</body>
</html>