/* Bencho-inspired components. All design tokens are scoped to the trade explorer;
   original MIT reference sources and explanatory comments live in vendor/bencho. */
.trade-data{--trade-ink:#123b57;--trade-muted:#566d7d;--trade-edge:#dce5eb;--trade-surface:#f3f7fa;--trade-blue:#147ad1;font-variant-numeric:tabular-nums}
.trade-data button,.trade-data input{font:inherit}
.trade-data button:focus-visible,.trade-data input:focus-visible{outline:3px solid #147ad1;outline-offset:-3px}
.trade-eyebrow{display:block;font-size:var(--text-12);font-weight:600;letter-spacing:.13em;line-height:1.6;color:var(--trade-muted)}
.trade-muted{font-size:var(--text-12);color:var(--trade-muted);line-height:1.7}
.trade-data .trade-status{padding:12px 16px;border:1px solid var(--trade-edge);border-radius:8px;background:#fff;font-size:var(--text-12);color:var(--trade-muted);margin:8px 0 28px;display:flex;align-items:center;gap:10px}
.trade-status:before{content:'';width:6px;height:6px;flex:none;background:#218b75;border-radius:50%}
.trade-data[aria-busy=true] .trade-status:before{background:#d49639}
.trade-controls{padding-bottom:14px}
.trade-controls select{background:#fff;border-color:var(--trade-edge);border-radius:8px}
.trade-refresh{display:flex;justify-content:flex-end;padding-bottom:4px;min-height:52px}
/* SIX DOTS, TURNING. A single linear rotation keeps every part of the
   revolution at the same speed. The spring only handles the journey home. */
.ptr{--pull:0px;--turn:0deg;display:flex;align-items:center;gap:10px;border:0;background:transparent;color:var(--trade-ink);padding:6px 10px;min-height:44px;cursor:grab;touch-action:none;user-select:none;border-radius:8px;transform:translateY(var(--pull));font-size:var(--text-12)!important}
.ptr:active{cursor:grabbing}.ptr:hover{background:var(--trade-surface)}.ptr-hint{color:var(--trade-muted);font-size:var(--text-12)}.ptr-ring{position:relative;display:block;width:28px;height:28px;transform:rotate(var(--turn))}.ptr-ring i{position:absolute;width:4px;height:4px;left:12px;top:12px;background:var(--trade-blue);border-radius:50%;transform:rotate(calc(var(--dot)*60deg)) translateY(-10px)}
.ptr[data-armed=true]{color:#117b69}.ptr[data-armed=true] .ptr-ring i{background:#117b69}.ptr[data-busy=true] .ptr-ring{animation:ptr-spin 2.4s linear infinite}.ptr[data-busy=true]{cursor:wait}
@keyframes ptr-spin{to{transform:rotate(360deg)}}
.trade-overview{display:grid;grid-template-columns:1.1fr 1.8fr;padding:32px 0 38px;border-top:1px solid var(--trade-edge);gap:32px}
.trade-primary h3{font-size:var(--text-24);font-weight:400;letter-spacing:-.02em;margin:10px 0 4px}.trade-total{display:block;font-size:var(--fluid-56);font-weight:400;line-height:1.22;letter-spacing:-.055em;color:var(--trade-ink)}
.trade-primary p{margin:12px 0 0}.trade-facts{display:grid;grid-template-columns:1.15fr 1fr 1fr;align-items:center;gap:20px}.trade-facts>div{min-width:0;border-left:1px solid var(--trade-edge);padding-left:20px}.trade-facts strong{display:block;font-size:var(--text-24);line-height:1.3;font-weight:500;letter-spacing:-.03em;margin:10px 0}.trade-facts small{display:block;font-size:var(--text-12);color:var(--trade-muted);line-height:1.65}
.trade-visuals{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(270px,1fr);gap:24px;align-items:stretch}.trade-history,.trade-composition{border:1px solid var(--trade-edge);border-radius:18px;background:#fff;min-width:0}.trade-history{background:var(--trade-surface)}.trade-chart-loading{padding:120px 24px;text-align:center;font-size:var(--text-14)}.trade-composition{padding:28px}.trade-data .trade-composition h4{margin:8px 0 22px;font-size:var(--text-18);font-weight:400}
.trade-ring-wrap{display:flex;justify-content:center;margin:24px 0}.trade-ring{width:174px;height:174px;border-radius:50%;display:grid;place-items:center;transform:rotate(-90deg)}.trade-ring>div{width:128px;height:128px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center;transform:rotate(90deg)}.trade-ring strong{font-size:var(--text-28);font-weight:400;letter-spacing:-.04em}.trade-ring span{font-size:var(--text-12);color:var(--trade-muted);margin-top:6px}.trade-composition-legend{display:grid;gap:11px}.trade-composition-legend>div{display:flex;gap:9px;align-items:center;font-size:var(--text-12)}.trade-composition-legend span{flex:1}.trade-composition-legend strong{font-size:var(--text-12);font-weight:500}.trade-composition-legend i,.stb-legend i,.stb-breakdown i{width:8px;height:8px;border-radius:2px;flex:none}.trade-chart-note{font-size:var(--text-12);line-height:1.7;color:var(--trade-muted);margin:20px 0 0}
/* Stacked bars: the gap is visual air, not extra value. Segments use their
   exact proportions and an inset white hairline, so the axis stays honest. */
.stb{--fill-on:var(--trade-ink);--fill-slab:var(--trade-surface);padding:28px;color:var(--fill-on)}.stb-head{display:flex;align-items:center;justify-content:space-between;gap:14px}.trade-data .stb-head h4{font-size:var(--text-18);font-weight:400;margin:8px 0 0;letter-spacing:-.02em}.stb-controls{display:flex;flex:none;padding:3px;background:#e4ecf1;border-radius:9px}.stb-controls button{border:0;background:transparent;border-radius:7px;min-height:32px;padding:0 11px;font-size:var(--text-12);color:var(--trade-muted);cursor:pointer}.stb-controls button[aria-pressed=true]{background:#fff;box-shadow:0 1px 4px #123b5710;color:var(--trade-ink)}
.stb>.trade-muted{margin:8px 0 32px}.stb-graph{display:grid;grid-template-columns:50px 1fr;gap:8px;margin-top:18px}.stb-y-axis{height:210px;display:flex;flex-direction:column;justify-content:space-between;font-size:var(--text-12);color:var(--trade-muted);padding-bottom:0;transform:translateY(-5px)}
.stb-plot{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));column-gap:22px;position:relative;padding:0 12px;background:linear-gradient(var(--trade-edge),var(--trade-edge)) 0 0/100% 1px no-repeat,linear-gradient(var(--trade-edge),var(--trade-edge)) 0 105px/100% 1px no-repeat,linear-gradient(var(--trade-edge),var(--trade-edge)) 0 210px/100% 1px no-repeat}
.stb-col{position:relative;padding:0;border:0;background:transparent;text-align:center;cursor:pointer;min-width:0;color:var(--trade-ink);border-radius:5px;display:flex;flex-direction:column;align-items:stretch}.stb-stack{position:relative;height:210px;display:flex;flex-direction:column-reverse;justify-content:flex-start;transform-origin:bottom;transform:scaleY(0);transition:transform .6s cubic-bezier(.22,1,.36,1);transition-delay:calc(var(--i)*65ms);width:100%;max-width:66px;align-self:center}
.stb.is-seen .stb-stack{transform:scaleY(1)}.stb-segment{display:block;width:100%;flex:none;background:var(--c);border-radius:3px;box-shadow:inset 0 1px 0 #f3f7fa;transition:height .5s cubic-bezier(.22,1,.36,1),background-color .16s}
.stb-col[data-active=false] .stb-segment{background-color:color-mix(in srgb,var(--c) 65%,var(--fill-slab))}.stb-col[data-active=true] .stb-stack:after{content:'';position:absolute;inset:-5px;border:1px solid #45657a66;border-radius:7px;pointer-events:none}.stb-year{display:block;font-size:var(--text-12);margin-top:15px;line-height:22px}.stb-year.is-current{font-weight:700}.stb-count{font-size:var(--text-12);color:var(--trade-muted);white-space:nowrap;line-height:18px}.stb-empty{position:absolute;top:50%;left:0;right:0;font-size:var(--text-18);color:var(--trade-muted)}
.stb-readout{margin:24px 0 18px;border:1px solid var(--trade-edge);background:#fff;border-radius:10px;padding:14px 16px;min-height:106px}.stb-readout-title{display:flex;gap:12px;align-items:baseline;font-size:var(--text-12)}.stb-readout-title b{font-size:var(--text-18);font-weight:500;letter-spacing:-.02em}.stb-readout-title>span{margin-left:auto;color:var(--trade-muted);font-size:var(--text-12)}.stb-breakdown{display:grid;grid-template-columns:1fr 1fr;gap:8px 22px;margin-top:12px}.stb-breakdown>span{display:flex;gap:7px;align-items:center;font-size:var(--text-12)}.stb-breakdown b{margin-left:auto;font-size:var(--text-12);font-weight:500}.stb-readout p{font-size:var(--text-12)}.stb-legend{display:flex;gap:10px 16px;flex-wrap:wrap}.stb-legend>span{display:flex;align-items:center;gap:6px;font-size:var(--text-12);color:var(--trade-muted)}
.trade-coverage{display:grid;grid-template-columns:1.5fr 1fr;gap:40px;align-items:center;background:#eef4f7;border-radius:12px;padding:24px 28px;margin:24px 0 40px}.trade-data .trade-coverage h4{margin:8px 0;font-size:var(--text-18);font-weight:400}.trade-coverage p{font-size:var(--text-12);line-height:1.7;color:var(--trade-muted);max-width:640px;margin:0}.trade-coverage-cells{display:grid;grid-template-columns:repeat(auto-fit,minmax(13px,1fr));gap:5px;max-width:380px}.trade-coverage-cells i{display:block;height:15px;background:#dbe5eb;border:1px solid #cbd9e3;border-radius:3px}.trade-coverage-cells i.is-covered{background:#247faf;border-color:#247faf}
.trade-table-heading{display:flex;align-items:end;justify-content:space-between;gap:24px;margin-bottom:20px}.trade-data .trade-table-heading h4{font-size:var(--text-24);font-weight:400;margin-top:8px;letter-spacing:-.02em}.trade-table-actions{display:flex;align-items:center;gap:12px}.trade-table-actions input{border:1px solid var(--trade-edge);padding:12px 14px;font-size:var(--text-12);border-radius:8px;max-width:190px;color:var(--trade-ink)}.trade-download{border:1px solid var(--trade-edge);background:#fff;border-radius:8px;padding:12px 14px;font-size:var(--text-12)!important;cursor:pointer;color:var(--trade-ink);white-space:nowrap}
.trade-markets .mi-table-scroll{max-height:450px;margin:0;border-top:1px solid var(--trade-edge);border-bottom:1px solid var(--trade-edge)}.trade-markets table{font-size:var(--text-12);width:100%;border-collapse:collapse}.trade-markets thead{position:sticky;top:0;background:#f3f7fa;z-index:1}.trade-markets th,.trade-markets td{padding:16px 18px;border-bottom:1px solid #e9eef2;text-align:left}.trade-markets tbody th{font-weight:500}.trade-markets thead th{font-size:var(--text-12);letter-spacing:.03em;font-weight:500}.trade-markets td:first-child{color:#718695;width:45px;font-size:var(--text-12)}.trade-markets td:nth-child(3){font-weight:500;white-space:nowrap}.trade-markets td:last-child{min-width:170px}.trade-share-track{display:inline-block;width:65px;height:4px;margin-left:16px;vertical-align:middle;background:#eaf0f4;border-radius:3px}.trade-share-track i{display:block;background:#147ad1;height:100%;border-radius:3px}.trade-table-count{font-size:var(--text-12);color:var(--trade-muted);margin:14px 0 30px}
@media(min-width:1300px){.trade-visuals{grid-template-columns:minmax(0,1.9fr) minmax(300px,1fr)}.stb-plot{column-gap:40px;padding:0 26px}}
@media(max-width:1000px){.trade-overview{grid-template-columns:1fr}.trade-facts{gap:20px}.trade-facts>div:first-child{border:0;padding-left:0}.trade-visuals{grid-template-columns:1fr}.trade-composition{display:grid;grid-template-columns:1fr 1fr;column-gap:30px}.trade-composition>.trade-eyebrow,.trade-composition>h4,.trade-composition>.trade-chart-note{grid-column:1/-1}.trade-composition-legend{align-content:center}.trade-ring-wrap{margin:0}.trade-table-heading{align-items:start;flex-direction:column}.trade-table-actions{width:100%}.trade-table-actions input{max-width:none;flex:1;min-width:0}}
@media(max-width:600px){.trade-overview{padding-top:22px;gap:26px}.trade-facts{grid-template-columns:1fr 1fr;gap:22px}.trade-facts>div:first-child{grid-column:1/-1}.trade-facts>div:nth-child(2){border:0;padding-left:0}.trade-facts strong{font-size:var(--text-24)}.trade-total{font-size:var(--text-56)}.stb{padding:22px 16px}.trade-data .stb-head h4{font-size:var(--text-18)}.stb-head{gap:6px}.stb-controls button{padding:0 10px}.stb>.trade-muted{font-size:var(--text-12)}.stb-graph{grid-template-columns:40px 1fr;gap:4px}.stb-plot{column-gap:18px;padding:0 8px}.stb-count{font-size:var(--text-12)}.stb-readout{padding:12px}.stb-readout-title{gap:8px}.stb-readout-title>span{font-size:var(--text-12)}.stb-breakdown{grid-template-columns:1fr;gap:7px}.stb-breakdown>span,.stb-breakdown b{font-size:var(--text-12)}.trade-composition{padding:22px 18px;column-gap:18px}.trade-ring{width:132px;height:132px}.trade-ring>div{width:98px;height:98px}.trade-ring strong{font-size:var(--text-24)}.trade-ring span{font-size:var(--text-12)}.trade-composition-legend>div,.trade-composition-legend strong{font-size:var(--text-12)}.trade-composition-legend{gap:13px}.trade-coverage{grid-template-columns:1fr;gap:20px;padding:22px 20px}.trade-coverage-cells{max-width:none}.trade-data .trade-table-heading h4{font-size:var(--text-18)}.trade-table-actions{gap:8px}.trade-table-actions input{font-size:var(--text-12);padding:12px}.trade-download{font-size:var(--text-12)!important;padding:12px}.trade-markets th,.trade-markets td{padding:14px 12px}.trade-refresh{justify-content:center}.ptr{font-size:var(--text-12)!important}.trade-data .trade-status{line-height:1.7}.trade-controls .button{grid-column:auto;align-self:end;justify-self:stretch;font-size:var(--text-12);padding:12px}}
@media(prefers-reduced-motion:reduce){.ptr,.stb *{animation:none!important;transition:none!important}.stb-stack{transform:none}}
/* Inspect the actual coloured segment, not only its enclosing year. */
.stb-graph{position:relative}.stb-hover{position:absolute;z-index:5;pointer-events:none;width:220px;background:#123b57;color:white;border-radius:9px;padding:12px 14px;box-shadow:0 8px 24px #123b5720;line-height:1.5}.stb-hover[hidden]{display:none}.stb-hover span,.stb-hover small{display:block;font-size:var(--text-12);color:#d5e5ee}.stb-hover strong{display:block;font-size:var(--text-18);letter-spacing:-.03em;font-weight:500;margin:4px 0}.stb-segment:hover{filter:brightness(1.1);box-shadow:inset 0 0 0 2px #fff}.stb-breakdown .is-picked{background:#eaf3f9;border-radius:4px;outline:4px solid #eaf3f9}.trade-country-link{border:0;background:none;padding:0;color:#126eb4;font:inherit;cursor:pointer;text-align:left}.trade-country-link:hover{text-decoration:underline}
.country-trade{border-top:1px solid var(--trade-edge);padding-top:34px;margin:38px 0;scroll-margin-top:100px}.country-controls{display:flex;gap:12px;align-items:end}.country-controls label{font-size:var(--text-12);display:flex;flex-direction:column;gap:8px}.country-controls select{min-width:200px;max-width:270px;font-size:var(--text-14)}.country-controls button{min-height:48px}.country-status{font-size:var(--text-12);line-height:1.7;background:#f0f6f9;padding:13px 16px;border-radius:8px;margin:18px 0}.country-charts{display:grid;grid-template-columns:1fr 1fr;gap:24px}.country-chart{background:var(--trade-surface);border:1px solid var(--trade-edge);padding:26px;border-radius:16px}.country-chart h5{font-size:var(--text-18);font-weight:400;margin:8px 0}.country-chart>.trade-muted{margin-bottom:22px}.country-partner-bar{border:1px solid transparent;width:100%;padding:10px 8px;margin:3px 0;border-radius:8px;background:none;cursor:pointer;color:var(--trade-ink);text-align:left}.country-partner-bar[data-active=true]{background:#fff;border-color:var(--trade-edge)}.country-partner-bar>span:first-child{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:var(--text-12);margin-bottom:9px}.country-partner-bar b{font-size:var(--text-12);font-weight:500}.country-partner-track{display:block;height:13px;background:#e1ebf1;border-radius:3px}.country-partner-track i{display:block;height:100%;background:#147ad1;border-radius:3px}.country-chart:nth-child(2) .country-partner-track i{background:#218b90}.country-chart-detail{padding:14px 16px;background:#fff;border:1px solid var(--trade-edge);border-radius:8px;margin-top:18px;min-height:68px}.country-chart-detail strong{display:block;font-size:var(--text-14);font-weight:500}.country-chart-detail span{display:block;font-size:var(--text-12);color:var(--trade-muted);margin-top:5px}.country-partner-heading{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:30px 0 18px}.country-partner-heading h5{font-size:var(--text-18);font-weight:400}.country-partner-heading input{font-size:var(--text-12);max-width:230px}.country-partner-table{max-height:380px;margin-top:0}.country-partner-table thead{position:sticky;top:0}.country-partner-table th,.country-partner-table td{font-size:var(--text-12)}
@media(max-width:800px){.country-controls{width:100%;flex-wrap:wrap}.country-controls label{flex:1}.country-controls select{max-width:none;width:100%}.country-charts{grid-template-columns:1fr}.country-partner-heading{display:block}.country-partner-heading input{margin-top:14px;max-width:none;width:100%}}
@media(max-width:450px){.country-chart{padding:20px 15px}}
.trade-composition-legend>button{display:flex;gap:9px;align-items:center;font-size:var(--text-12);border:1px solid transparent;background:none;color:var(--trade-ink);border-radius:6px;padding:6px;text-align:left;cursor:pointer}.trade-composition-legend>button[aria-pressed=true]{background:#eef5fa;border-color:var(--trade-edge)}.trade-ring span{max-width:105px;text-align:center;line-height:1.35}.trade-composition-legend{gap:3px}
@media(max-width:600px){.trade-composition-legend>button{font-size:var(--text-12);padding:5px}.trade-ring span{max-width:80px}}

/* User-provided trade illustration, placed immediately before the footer. */
/* Visible product choices; native radios retain form and keyboard behaviour. */
.trade-controls{grid-template-columns:1fr 1fr auto}.trade-product-tabs{grid-column:1/-1;border:0;margin:0 0 12px;padding:0;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;min-width:0}.trade-product-tabs legend{font-size:var(--text-14);font-weight:500;padding:0;margin-bottom:14px;color:var(--trade-ink)}.trade-controls .trade-product-tab{position:relative;display:block;cursor:pointer;margin:0}.trade-product-tab input{position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:0;border:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.trade-product-tab span{display:flex;align-items:center;justify-content:center;text-align:center;min-height:52px;padding:12px 10px;border:1px solid #cad9e4;border-radius:9px;background:#f4f8fb;font-size:var(--text-14);font-weight:500;line-height:1.4;color:#36566e;transition:background .15s,border-color .15s,color .15s}.trade-product-tab:hover span{border-color:#147ad1;background:#eaf3fa}.trade-product-tab input:checked+span{background:#eaf4fc;color:#123b57;border-color:#147ad1;box-shadow:inset 0 0 0 1px #147ad1}.trade-product-tab input:focus-visible+span{outline:3px solid #147ad1;outline-offset:-3px;border-color:#147ad1;box-shadow:none}.stb-product{display:inline-block;font-size:var(--text-12);font-weight:500;color:#0f659e;background:#e5f0f8;border-radius:6px;padding:7px 11px;margin:16px 0 0}.stb>.trade-muted{margin-top:12px}
@media(max-width:800px){.trade-product-tabs{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:650px){.trade-controls{grid-template-columns:1fr 1fr}.trade-controls .button{grid-column:1/-1}.trade-product-tabs{gap:8px;margin-bottom:8px}.trade-product-tab span{font-size:var(--text-12);min-height:48px;padding:10px 6px}.stb-product{font-size:var(--text-12)}}
@media(prefers-reduced-motion:reduce){.trade-product-tab span{transition:none}}
.standalone-country{padding-top:26px}.country-page-filters{grid-template-columns:minmax(160px,240px) 1fr}.country-page-hint{align-self:center;font-size:var(--text-12);color:var(--trade-muted);line-height:1.7;margin:16px 0 0}.standalone-country .country-trade{margin-top:22px;padding-top:30px}.country-trade .trade-table-heading h2{font-size:var(--text-24);font-weight:400;letter-spacing:-.02em;margin-top:8px}.country-chart h3{font-size:var(--text-18);font-weight:400;margin:8px 0}.country-partner-heading h3{font-size:var(--text-18);font-weight:400}.site-imports-exports .mi-method{margin-bottom:30px}
@media(max-width:650px){.country-page-filters{grid-template-columns:1fr}.country-page-hint{margin:0}.country-trade .trade-table-heading h2{font-size:var(--text-18)}}
/* Bottom-centred filters appear after their original position has scrolled away. */
.trade-filter-slot{position:relative}.trade-controls.is-floating{position:fixed;z-index:90;left:50%;bottom:max(18px,env(safe-area-inset-bottom));transform:translateX(-50%);width:min(1120px,calc(100% - 40px));margin:0;padding:15px 18px;display:grid;grid-template-columns:minmax(0,1fr) 130px 165px;gap:18px;align-items:end;border:1px solid #cbdce8;border-radius:16px;background:rgba(255,255,255,.97);box-shadow:0 10px 50px #123b5729,0 2px 8px #123b5712;backdrop-filter:blur(16px)}
.trade-controls.is-floating .trade-product-tabs{grid-column:auto;margin:0;gap:6px}.trade-controls.is-floating .trade-product-tabs legend{font-size:var(--text-12);margin-bottom:7px}.trade-controls.is-floating .trade-product-tab span{min-height:36px;font-size:var(--text-12);padding:8px 6px;border-radius:6px}.trade-controls.is-floating>label{font-size:var(--text-12);gap:7px}.trade-controls.is-floating select{min-height:36px;padding:8px 10px;font-size:var(--text-12);border-radius:6px}.trade-controls.is-floating>.button{display:none}.has-floating-trade-filters{padding-bottom:var(--floating-filter-height,120px)}
.country-page-filters:not(.is-floating){width:100%;max-width:none;grid-template-columns:repeat(2,minmax(0,1fr))}
/* A single-flow view keeps the relevant total, chart and table column visible.
   The API still supplies both flows, so switching is instant and needs no call. */
#country-explorer[data-flow=M] .country-charts>.country-chart:nth-child(2),#country-explorer[data-flow=X] .country-charts>.country-chart:first-child,#country-explorer[data-flow=M] .country-figures>div:not([data-metric=imports]),#country-explorer[data-flow=X] .country-figures>div:not([data-metric=exports]),#country-explorer[data-flow=M] .country-share,#country-explorer[data-flow=X] .country-share,#country-explorer[data-flow=M] .country-share-caption,#country-explorer[data-flow=X] .country-share-caption,#country-explorer[data-flow=M] .country-partner-table tr>:nth-child(3),#country-explorer[data-flow=X] .country-partner-table tr>:nth-child(2){display:none}
#country-explorer[data-flow=M] .country-charts,#country-explorer[data-flow=X] .country-charts{grid-template-columns:1fr}

@media(max-width:900px){.trade-controls.is-floating{grid-template-columns:1fr 1fr;gap:10px 14px;padding:12px 14px;width:calc(100% - 28px);bottom:max(12px,env(safe-area-inset-bottom))}.trade-controls.is-floating .trade-product-tabs{grid-column:1/-1;display:flex;gap:6px;overflow-x:auto;scrollbar-width:thin;padding:0 2px 4px}.trade-controls.is-floating .trade-product-tab{flex:1 0 auto;min-width:76px}.trade-controls.is-floating .trade-product-tab span{font-size:var(--text-12);min-height:33px;padding:7px 10px}.trade-controls.is-floating select{min-height:33px}.trade-controls.is-floating>label{gap:5px}.trade-controls.is-floating .trade-product-tabs legend{margin-bottom:5px}}
@media(max-width:650px){.country-page-filters:not(.is-floating){grid-template-columns:1fr 1fr}}
@media print{.trade-controls.is-floating{display:none}.has-floating-trade-filters{padding-bottom:0}}
html:has(.trade-filter-slot){scroll-padding-bottom:var(--floating-filter-height,0px);scroll-padding-top:90px}
/* Separate photography and labels for a clear, readable product picker. */
.trade-product-tab span{position:relative;overflow:hidden;padding:12px 12px 12px 72px;min-height:72px;background:#fff;color:#123b57;font-weight:500;text-align:left;justify-content:flex-start}
.trade-product-tab span::before{content:"";position:absolute;left:10px;top:50%;width:50px;height:50px;transform:translateY(-50%);border-radius:9px;background-image:var(--product-image);background-size:var(--product-size,300% 200%);background-position:var(--product-position);pointer-events:none}
.trade-product-tab input:checked+span{font-weight:600}
.trade-controls.is-floating .trade-product-tab span{padding:6px 10px 6px 48px;min-height:46px}
.trade-controls.is-floating .trade-product-tab span::before{left:7px;width:32px;height:32px;border-radius:6px}

.trade-data,.trade-filter-slot{overflow-anchor:none}
.trade-data[aria-busy=true] .trade-result{opacity:.45;pointer-events:none}


/* One horizontal product strip on desktop, mobile, and the floating bar. */
.trade-controls .trade-product-tabs,.trade-controls.is-floating .trade-product-tabs{display:block;overflow:visible;min-width:0;padding:0}
.trade-product-tabs legend{width:100%;display:flex;justify-content:space-between;align-items:center;gap:10px}
.trade-product-tabs legend small{font-size:var(--text-12);font-weight:400;color:#60798b}
.trade-product-browser{display:grid;grid-template-columns:30px minmax(0,1fr) 30px;gap:8px;align-items:center;min-width:0}
.trade-product-strip{display:flex;gap:10px;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#adc2d2 transparent;padding:2px 0 7px;min-width:0}
.trade-controls .trade-product-strip .trade-product-tab{flex:0 0 208px;min-width:0}
.trade-product-strip .trade-product-tab span{height:72px;line-height:1.3}
.trade-data .product-scroll{display:flex;align-items:center;justify-content:center;width:30px;height:36px;min-height:0;padding:0;border:1px solid #cad9e4;border-radius:8px;background:#fff;color:#123b57;font-size:var(--text-16);cursor:pointer}
.trade-data .product-scroll:disabled{opacity:.3;cursor:default}
.trade-controls.is-floating .trade-product-browser{grid-template-columns:24px minmax(0,1fr) 24px;gap:5px}
.trade-controls.is-floating .trade-product-strip{gap:6px;padding-bottom:4px}
.trade-controls.is-floating .trade-product-strip .trade-product-tab{flex-basis:170px}
.trade-controls.is-floating .trade-product-strip .trade-product-tab span{height:48px;min-height:48px}
.trade-controls.is-floating .product-scroll{width:24px;height:30px;font-size:var(--text-16)}
.trade-controls.is-floating .trade-product-tabs legend small{font-size:var(--text-12)}
@media(max-width:650px){.trade-product-tabs legend small{font-size:var(--text-12)}.trade-controls:not(.is-floating) .trade-product-strip .trade-product-tab{flex-basis:194px}}
.trade-all-products span::before{content:'';background-color:#e8f1f8;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23126eb4' stroke-width='1.6' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7.5' height='7.5' rx='2'/%3E%3Crect x='13.5' y='3' width='7.5' height='7.5' rx='2'/%3E%3Crect x='3' y='13.5' width='7.5' height='7.5' rx='2'/%3E%3Crect x='13.5' y='13.5' width='7.5' height='7.5' rx='2' fill='%23126eb4' fill-opacity='.18'/%3E%3C/svg%3E");background-size:58% 58%;background-position:center;background-repeat:no-repeat}
.trade-product-tabs .trade-reset-product{border:0;background:none;color:#126eb4;font:inherit;font-size:var(--text-12);text-decoration:underline;text-underline-offset:3px;padding:0;cursor:pointer}
/* Imports & Exports: balanced dashboard, data-led graphics and stable loading. */
.country-page-filters:not(.is-floating){gap:24px 28px;padding:28px;background:#f7fafc;border:1px solid #e1eaf0;border-radius:16px}
.country-page-filters:not(.is-floating) .trade-product-tabs{width:100%;grid-column:1/-1;margin-bottom:0}
.country-page-filters:not(.is-floating)>label{width:100%}.country-page-filters:not(.is-floating) select{width:100%}
.country-status{display:flex;align-items:center;gap:10px;background:transparent;border-bottom:1px solid #e1eaf0;border-radius:0;padding:14px 0;margin:12px 0 8px}
.country-status::before{content:'';flex:none;width:7px;height:7px;border-radius:50%;background:#15958c}
.country-trade[aria-busy=true] .country-status::before{width:13px;height:13px;border:2px solid #d5e5f1;border-top-color:#147ad1;background:transparent;animation:ptr-spin .9s linear infinite}
.country-controls button:disabled{opacity:.6;cursor:wait}






.country-chart{background:white;padding:25px}.country-chart-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.country-chart-heading h3{font-size:var(--text-18)}.country-chart-axis{display:flex;justify-content:space-between;padding:0 9px;margin:20px 0 12px;color:#728595;font-size:var(--text-12)}.country-chart-rows{background:linear-gradient(to right,transparent calc(50% - .5px),#e5edf3 50%,transparent calc(50% + .5px))}.country-ranked-name{display:flex;align-items:center;gap:9px}.country-ranked-name small{font-size:var(--text-12);color:#8397a6;font-variant-numeric:tabular-nums}.country-partner-track{height:10px;background:#f0f5f8;border-radius:5px}.country-partner-track i{border-radius:5px;background:linear-gradient(90deg,#147ad1,#52a8df);transition:width .3s ease;transform-origin:left}.country-chart[data-flow=X] .country-partner-track i{background:linear-gradient(90deg,#15958c,#59b9a8)}.country-partner-bar[data-active=true]{background:#f1f7fb;border-color:#d4e5f1}.country-chart-detail{background:#f5f9fc;border:1px solid #d2e3ef;border-radius:8px}.country-chart[data-flow=X] .country-chart-detail{border-color:#15958c}

.country-animate.is-visible{animation:country-reveal .45s ease both}.country-chart:not(.is-visible) .country-partner-track i{transform:scaleX(0)}.country-chart.is-visible .country-partner-track i{animation:country-bar .65s cubic-bezier(.2,.7,.2,1) both;animation-delay:var(--bar-delay,0ms)}
@keyframes country-reveal{from{opacity:.3;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@keyframes country-bar{from{transform:scaleX(0)}to{transform:scaleX(1)}}
@keyframes country-ring{from{opacity:0;transform:scale(.9)}to{opacity:1;transform:scale(1)}}
.country-skeleton{padding-top:22px}.country-skeleton-totals,.country-skeleton-charts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:24px}.country-skeleton-totals>div,.country-skeleton-charts>div{padding:24px;border:1px solid #e1eaf0;border-radius:13px;background:#f9fbfc}.country-skeleton i,.country-skeleton b{display:block;height:12px;width:60%;border-radius:5px;background:#e5edf3;margin-bottom:18px}.country-skeleton-totals b{height:42px;width:75%}.country-skeleton-charts{grid-template-columns:1fr 1fr}.country-skeleton-charts b{height:24px;margin-bottom:35px}.country-skeleton-charts i{height:20px;margin-bottom:28px}.country-skeleton-mix{display:flex;justify-content:center;align-items:center;gap:60px;padding:35px;margin-bottom:24px;border:1px solid #e1eaf0;border-radius:16px;background:#f9fbfc}.country-skeleton-ring{width:160px;height:160px;border-radius:50%;border:23px solid #e5edf3;flex:none}.country-skeleton-lines{height:90px;width:220px;border-radius:8px;background:repeating-linear-gradient(#e5edf3 0 14px,transparent 14px 32px)}.country-skeleton{animation:country-pulse 1.4s ease-in-out infinite}
@keyframes country-pulse{0%,100%{opacity:.6}50%{opacity:1}}
@media(max-width:1100px){.country-chart-heading{align-items:start;flex-direction:column}}
@media(max-width:800px){.country-page-filters:not(.is-floating){padding:20px;gap:20px}.country-chart-heading{flex-direction:row;align-items:center}.country-skeleton-totals{gap:10px}.country-skeleton-totals>div{padding:14px}.country-skeleton-mix{gap:25px}.country-skeleton-charts{grid-template-columns:1fr}}
@media(max-width:450px){.country-page-filters:not(.is-floating){padding:16px;gap:16px}.country-chart-heading{flex-direction:column;align-items:start}.country-skeleton-totals{grid-template-columns:1fr}.country-skeleton-totals>div{height:135px}.country-skeleton-mix{gap:20px;padding:25px}.country-skeleton-ring{width:100px;height:100px;border-width:16px}}
@media(prefers-reduced-motion:reduce){.country-animate,.country-animate.is-visible,.country-chart.is-visible .country-partner-track i,.country-skeleton,.country-trade[aria-busy=true] .country-status::before{animation:none!important}.country-chart:not(.is-visible) .country-partner-track i{transform:none}}

/* Coverage panel: a plain-language summary, with a single reported/expected bar when
   the region has a fixed country list. */
.trade-coverage.is-text-only{grid-template-columns:1fr}
.trade-coverage h4{margin:0 0 8px;font-size:var(--text-16);font-weight:600;color:#0768cc}
.trade-coverage .trade-coverage-lead{font-size:var(--text-16);line-height:1.45;color:#123652;max-width:640px}
.trade-coverage-notes{margin:14px 0 0;padding-left:18px;font-size:var(--text-16);line-height:1.7;color:#4d667c;max-width:680px}
.trade-coverage-notes li+li{margin-top:4px}
.trade-coverage-meter{display:grid;grid-template-columns:auto 1fr;align-items:baseline;gap:4px 10px}
.trade-coverage-meter strong{font-size:var(--text-28);font-weight:500;color:#123652}
.trade-coverage-meter span{font-size:var(--text-16);color:#4d667c}
.trade-coverage-bar{grid-column:1/-1;height:10px;margin-top:8px;border-radius:999px;background:#d6e3eb;overflow:hidden}
.trade-coverage-bar i{display:block;height:100%;border-radius:inherit;background:#247faf}
.trade-coverage-missing{grid-column:1/-1;margin-top:10px!important}

/* Global coverage: one row per year, so the dip in the latest year is visible. */
.trade-coverage-years-title{font-size:var(--text-14)!important;font-weight:600;color:#123652!important;margin:0 0 12px!important}
.trade-coverage-year-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.trade-coverage-year-list li{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:12px;font-size:var(--text-16);color:#4d667c}
.trade-coverage-year-list strong{text-align:right;font-weight:600;color:#123652}
.trade-coverage-year-bar{height:10px;border-radius:999px;background:#d6e3eb;overflow:hidden}
.trade-coverage-year-bar i{display:block;height:100%;border-radius:inherit;background:#9fc3d8}
.trade-coverage-year-list li.is-current{color:#123652;font-weight:600}
.trade-coverage-year-list li.is-current .trade-coverage-year-bar i{background:#247faf}

/* Country summary: context line, three figures with hairline dividers, one proportion bar. */
.country-summary{padding:26px 0 34px;border-bottom:1px solid var(--trade-edge);margin-bottom:34px}
.country-summary-context{font-size:var(--text-14);color:var(--trade-muted);margin:0 0 18px}
.country-figures{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.country-figures>div{min-width:0;padding-left:20px;border-left:1px solid var(--trade-edge)}
.country-figures>div:first-child{padding-left:0;border-left:0}
.country-figures span{display:block;font-size:var(--text-14);font-weight:500;color:#36566e}
.country-figures strong{display:block;font-size:var(--fluid-40);font-weight:400;letter-spacing:-.03em;line-height:1.1;margin-top:8px;color:var(--trade-ink)}
.country-figures small{display:block;font-size:var(--text-12);line-height:1.6;color:var(--trade-muted);margin-top:6px}
.country-share{display:flex;height:12px;margin-top:26px;border-radius:999px;overflow:hidden;background:#dfe9f0}
.country-share i{display:block;height:100%}
.country-share .is-imports{background:#147ad1;min-width:2px}
.country-share .is-exports{background:#15958c;flex:1;min-width:2px}
.country-share-caption{font-size:var(--text-12);line-height:1.7;color:var(--trade-muted);margin:10px 0 0}
#country-explorer[data-flow=M] .country-figures,#country-explorer[data-flow=X] .country-figures{grid-template-columns:minmax(0,1fr)}
@media(max-width:700px){.country-figures{grid-template-columns:1fr;gap:16px}.country-figures>div{padding:16px 0 0;border-left:0;border-top:1px solid var(--trade-edge)}.country-figures>div:first-child{padding-top:0;border-top:0}}

/* Turnstile shows here only when Cloudflare needs the visitor to interact. */
.trade-turnstile{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);z-index:100}
