/* Trade detail: compact, mobile-first, and separate from the BOP headline. */
.td-panel{margin:30px 0 45px;background:var(--panel);border:1px solid var(--line);padding:clamp(18px,3vw,30px)}
.td-panel .section-head{margin-bottom:14px}
.td-panel .section-head h2{margin:3px 0 8px;font-size:clamp(23px,2.8vw,32px)}
.td-panel .td-explainer,.td-panel .td-state,.td-panel .td-method{color:var(--muted);font-size:14px}
.td-controls{display:flex;align-items:end;flex-wrap:wrap;gap:14px;margin:20px 0}
.td-controls label{font-size:13px;font-weight:650;display:flex;flex-direction:column;gap:6px;flex:1 1 180px}
.td-controls select{font:inherit;min-height:44px;min-width:100%;max-width:100%;border:1px solid #aeb8bd;background:white;border-radius:4px;padding:9px}
.td-controls select:focus-visible{outline:3px solid #a65b40;outline-offset:2px}
.td-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:18px 0}
.td-stat{padding:17px;background:var(--soft);min-width:0;overflow-wrap:anywhere}
.td-stat span{display:block;color:var(--muted);font-size:12px}
.td-stat strong{display:block;font-size:clamp(17px,2.1vw,26px);line-height:1.25;margin-top:5px;font-weight:600}
.td-stat .td-small{font-size:clamp(14px,1.55vw,19px)}
.td-table{width:100%;border-collapse:collapse;min-width:750px;font-size:13px}
.td-table thead{background:var(--soft)}
.td-table th,.td-table td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:right;vertical-align:top;font-variant-numeric:tabular-nums}
.td-table th:first-child{text-align:left;min-width:210px}
.td-table tbody th{font-weight:550}
.td-table-scroll{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.td-panel[hidden]{display:none}
.td-availability{padding:14px 18px;border:1px dashed #aeb8bd;color:var(--muted);margin:16px 0}
.td-source{margin-top:18px;font-size:13px;line-height:1.6;color:var(--muted)}
.td-source a{color:var(--ink);text-decoration:underline}
@media(max-width:650px){
 .td-panel{padding:18px;margin:18px 0 32px}
 .td-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .td-stat:last-child{grid-column:1/-1}
 .td-table th,.td-table td{padding:11px 8px}
}

/* New Depth: monthly customs history navigation alongside geography/direction. */
#td-section .td-controls{align-items:end;gap:10px 14px}
#td-section .td-history-picker{display:flex;align-items:end;justify-content:flex-start;flex:1 1 100%;flex-wrap:wrap;gap:6px;min-width:0}
#td-section .td-history-picker label{flex:0 1 auto;display:flex;flex-direction:column;gap:5px;min-width:0;font-size:11px;color:var(--muted)}
#td-section .td-history-picker label select{box-sizing:border-box;min-height:36px;min-width:0;max-width:none;padding:6px 8px;font-size:12px;font-weight:600}
#td-section .td-history-picker #td-month{width:98px}
#td-section .td-history-picker #td-year{width:94px}
#td-section .td-history-picker button{box-sizing:border-box;min-height:36px;border:1px solid #aeb8bd;border-radius:4px;background:#fff;color:var(--ink);font-family:inherit;font-size:12px;font-weight:600;cursor:pointer}
#td-section .td-history-picker #td-latest{padding:0 12px}
#td-section .td-history-picker .td-month-step{width:36px;padding:0;font-size:20px;line-height:1}
#td-section .td-history-picker button:disabled{opacity:.45;cursor:default}
#td-section .td-history-picker button:focus-visible,#td-section .td-history-picker select:focus-visible{outline:2px solid #277d94;outline-offset:2px}
#td-section .td-history-status{font-size:11px;line-height:1.45;color:var(--muted);margin:-7px 0 14px;min-height:16px}
@media(min-width:880px){#td-section .td-history-picker{flex:2 1 300px;justify-content:flex-end}}
@media(max-width:480px){#td-section .td-history-picker{gap:5px}#td-section .td-history-picker #td-month{width:90px}#td-section .td-history-picker #td-year{width:85px}}
