.customs-source-page { margin-block: 1.5rem; scroll-margin-top: 6rem; }
.customs-source-page h3 { border-bottom: 1px solid var(--line); padding-bottom: .45rem; }
.customs-page-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; }
[data-customs-jump] input { width: 6rem; padding: .45rem; }
.customs-tabs { display: flex; flex-wrap: wrap; gap: .2rem 1rem; border-bottom: 1px solid var(--line); margin: .6rem 0 1.5rem; }
.customs-tabs a { padding: .55rem .1rem; text-decoration: none; font-size: .94rem; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; }
.customs-tabs a[aria-current], .customs-tabs a:hover { color: var(--ink); border-color: var(--amber); }
.customs-mast { display: grid; grid-template-columns: 1.25fr 1fr; gap: 2rem; align-items: center; padding: clamp(1.4rem,4vw,3.25rem); border-radius: var(--radius-lg); background: #12355b; color: white; }
.customs-mast h1, .customs-heading h1 { margin: 0; line-height: 1.12; letter-spacing: -.035em; font-size: clamp(2.1rem,4vw,3.6rem); }
.customs-mast h1 { color: white; }
.customs-mast p { max-width: 57ch; color: #e2eaf5; margin: 1rem 0; }
.customs-language { color: #fff0bf; }
.customs-lookup, .customs-filter-panel { padding: clamp(1rem,2.5vw,1.65rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); }
.customs-lookup label { display: block; font-size: 1.22rem; font-weight: 700; margin-bottom: .65rem; }
.customs-lookup small { display: block; margin-top: .65rem; color: var(--muted); }
.customs-searchline { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.customs-searchline input, .customs-filters :is(input,select) { min-width: 0; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-radius: .45rem; min-height: 2.75rem; padding: .5rem .65rem; font: inherit; }
.customs-searchline input { flex: 1; width: 100%; }
.customs-destinations { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 1.25rem 0 2.5rem; border: 1px solid var(--line); border-radius: var(--radius); }
.customs-destinations article { display: flex; flex-direction: column; align-items: flex-start; padding: 1.25rem; }
.customs-destinations article + article { border-inline-start: 1px solid var(--line); }
.customs-destinations h2 { font-size: 1.22rem; margin: 0; }
.customs-destinations p { margin: .5rem 0 1rem; color: var(--muted); }
.customs-destinations a { margin-top: auto; font-weight: 650; }
.customs-section-head, .customs-heading, .customs-filter-foot, .customs-related, .customs-page-controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.customs-section-head { margin: 1.75rem 0 .6rem; }
.customs-section-head h2 { margin: 0; }
.customs-heading { padding: .5rem 0 1.2rem; }
.customs-heading p { max-width: 70ch; color: var(--ink-2); margin-bottom: 0; }
.customs-directory-table { width: 100%; }
.customs-directory-table ul { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.customs-directory-table th[scope=row] { min-width: 9rem; text-align: start; }
.customs-directory-table a span { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.customs-related { justify-content: flex-start; padding: 1rem 0; }
.customs-filter-panel { background: var(--surface-2); }
.customs-product { align-items: stretch; flex-direction: column; gap: .3rem; }
.customs-product label, .customs-filters label { font-weight: 650; font-size: .93rem; }
.customs-filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem 1rem; margin: 1rem 0; }
.customs-filters label { display: grid; gap: .25rem; min-width: 0; }
.customs-filters :is(input,select) { width: 100%; font-weight: 400; }
.customs-filter-foot small, .customs-result-count { color: var(--muted); }
.customs-result-count { font-variant-numeric: tabular-nums; margin: .4rem 0 .7rem; }
.customs-rate-key { font-size: .9rem; color: var(--muted); margin: 0 0 .6rem; }
.customs-filter-toggle { display: none; }
.customs-rate-scroll { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: auto; }
.customs-rates { width: 100%; margin: 0; font-variant-numeric: tabular-nums; }
.customs-rates :is(td,th) { text-align: end; white-space: nowrap; padding: .65rem .7rem; }
.customs-rates th:first-child, .customs-rates td:nth-child(2) { text-align: start; }
.customs-rates th:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface); border-right: 1px solid var(--line); font-family: var(--font-mono); }
.customs-rates th:nth-child(2) { text-align: start; }
.customs-rates td:nth-child(2) { white-space: normal; min-width: 15rem; }
.customs-rates thead th, .customs-rates thead th:first-child { background: var(--surface-2); }
.customs-rates thead th, .customs-rates th[scope=row], .customs-directory-table th { font-size: .875rem; letter-spacing: normal; text-transform: none; }
.customs-rates tbody tr:hover { background: var(--surface-2); }
.customs-rates abbr { text-underline-offset: .2em; }
.customs-act-filters { display: flex; align-items: end; flex-wrap: wrap; gap: .65rem 1rem; }
.customs-act-filters label { max-width: 100%; min-width: 0; }
.customs-act-filters select { display: block; width: 100%; max-width: 23rem; padding: .6rem; font: inherit; border: 1px solid var(--line-strong); border-radius: .45rem; background: var(--surface); color: var(--ink); }
.customs-act-table { width: 100%; }
.customs-act-table th { text-align: start; }
.customs-act-table th[scope=row] { white-space: nowrap; }
.customs-act-table tr[hidden] { display: none; }
.customs-page-controls { justify-content: end; margin: .9rem 0; font-variant-numeric: tabular-nums; }
.customs-guide { border-top: 1px solid var(--line); padding: .85rem 0; }
.customs-guide summary { font-weight: 650; cursor: pointer; }
.customs-guide dl { display: grid; grid-template-columns: repeat(auto-fit,minmax(12rem,1fr)); gap: .5rem; }
.customs-guide dl div { display: flex; gap: .5rem; }
.customs-guide dt { font-weight: 700; }
.customs-guide dd { margin: 0; }
[data-tariff-finder] [hidden] { display: none; }
@media (max-width: 800px) {
  .customs-mast { grid-template-columns: 1fr; gap: 1rem; }
  .customs-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .customs-filter-toggle { display: inline-flex; }
  .customs-filter-panel[data-compact] .customs-filters label:nth-child(n+3), .customs-filter-panel[data-compact] #tariff-date-help { display: none; }
  .customs-tabs { gap: 0 .75rem; }
  .customs-destinations { grid-template-columns: 1fr; }
  .customs-destinations article + article { border-inline-start: 0; border-top: 1px solid var(--line); }
  .customs-destinations article { padding: 1rem; }
  .customs-directory-table th[scope=row] { min-width: 0; }
  .customs-directory-table ul { display: grid; }
  .customs-rates td:nth-child(2) { min-width: 11rem; }
  .customs-section-head form, .customs-heading div { width: 100%; }
}
