/* htsduty.com shared look: navy and royal blue (day by default, night with the switch). Nov 2026 redesign.
   Used by every public page through /site.css; the header and footer come from /site.js. */

:root, :root[data-theme="light"] {
  --brand: #2F5BEA; --brand-hover: #1F4FD1; --brand-soft: #E9EFFD; --brand-line: #C9D6FA;
  --ink: #0B1A33; --ink-2: #17233B; --ink-3: #46526B; --ink-4: #76819A;
  --page: #F5F6F8; --surface: #FFFFFF; --surface-2: #F2F4F7; --line: #E2E6ED; --line-2: #CDD4DF;
  --ok: #2F8F5B; --ok-soft: #E3F6EC; --warn: #8A6A12; --warn-soft: #FFF6DA; --bad: #B4434E; --bad-soft: #FDE8EA;
  --lav: #EFEBFC; --peach: #FDEFE4;
  --hero: linear-gradient(180deg, #E9EEFA 0%, #F7F8FA 100%);
  --shadow: 0 1px 2px rgba(11, 26, 51, .05);
  /* main action buttons: royal blue; the header is navy */
  --action: #2F5BEA; --action-hover: #1F4FD1;
  --navy: #0B1A33; --navy-2: #122649; --on-navy: #AEBBD6; --on-navy-accent: #8DAAFF;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --mark: linear-gradient(135deg, #3A68F2, #1F4FD1);
  /* names the older pages use */
  --bg: var(--page); --text: var(--ink-2); --text-light: var(--ink-3); --text-faint: var(--ink-4);
  --accent: var(--brand); --accent-light: var(--brand-soft); --accent-hover: var(--brand-hover);
  --border: var(--line); --card: var(--surface); --warm: var(--surface-2);
  --red: var(--bad); --red-bg: var(--bad-soft);
  --g: var(--brand); --gh: var(--brand-hover); --gl: var(--brand-soft); --tx: var(--ink-2); --tl: var(--ink-3); --tf: var(--ink-4); --bd: var(--line);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand: #6F8CF0; --brand-hover: #839CF3; --brand-soft: rgba(111, 140, 240, .16); --brand-line: #3A4677;
  --ink: #F2F5FC; --ink-2: #E8ECF7; --ink-3: #A9B3CF; --ink-4: #8792B3;
  --page: #11162A; --surface: #181F38; --surface-2: #1E2644; --line: #262E4C; --line-2: #2C355A;
  --ok: #9AE6BB; --ok-soft: rgba(134, 222, 170, .16); --warn: #FFD98A; --warn-soft: rgba(255, 214, 120, .14);
  --bad: #FFB3BB; --bad-soft: rgba(255, 150, 160, .14); --lav: rgba(180, 165, 255, .16); --peach: rgba(255, 190, 150, .14);
  --hero: linear-gradient(135deg, #1A2347, #211D45 50%, #15283A);
  --shadow: none;
  --action: #3D63E6; --action-hover: #5579EE;
  --navy: #0A1226; --navy-2: #0F1A36; --on-navy: #AEBBD6; --on-navy-accent: #8DAAFF;
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --mark: linear-gradient(135deg, #3A68F2, #1F4FD1);
  color-scheme: dark;
}

body { font-family: var(--font); background: var(--page); color: var(--ink-2); }
/* one typeface everywhere (pages set their own fonts; this wins) and tabular numbers for money */
html body, html body button, html body input, html body select, html body textarea { font-family: var(--font); }
html body { font-feature-settings: "tnum" 1; }
html body .duty-code, html body code, html body kbd, html body .code { font-family: var(--mono); }
/* white input boxes with a thin border */
html body .form-input, html body .form-select { background: var(--surface) !important; border: 1px solid var(--line-2) !important; }
:focus-visible { outline: 3px solid var(--brand-line); outline-offset: 2px; }

/* header: navy in day and night */
.sh { position: sticky; top: 0; z-index: 200; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.06); }
.sh-in { max-width: 1320px; margin: 0 auto; height: 64px; display: flex; align-items: center; gap: 26px; padding: 0 24px; }
.sh-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-weight: 700; font-size: 19px; letter-spacing: -.01em; margin-right: auto; }
.sh-logo em { font-style: normal; color: var(--on-navy-accent); }
.sh-mark { width: 32px; height: 32px; border-radius: 8px; display: block; flex: none; }
.sh-nav { display: flex; gap: 22px; }
.sh-nav a { white-space: nowrap; font-size: 14.5px; color: var(--on-navy); text-decoration: none; font-weight: 500; padding: 21px 0; border-bottom: 2px solid transparent; }
.sh-nav a:hover { color: #fff; }
.sh-nav a.on { color: #fff; border-bottom-color: var(--on-navy-accent); font-weight: 600; }
.sh-btn { display: inline-flex; align-items: center; gap: 8px; background: var(--action); color: #fff !important; border: 0; border-radius: 9px;
          padding: 9px 16px; font-weight: 600; font-size: 14px; text-decoration: none; font-family: inherit; cursor: pointer; white-space: nowrap; }
.sh-btn:hover { background: var(--action-hover); }
.sh-tog { display: inline-flex; border: 1px solid rgba(255,255,255,.16); border-radius: 20px; padding: 3px; gap: 2px; background: transparent; }
.sh-tog button { width: 28px; height: 26px; border: 0; border-radius: 14px; background: none; color: var(--on-navy); cursor: pointer; font-size: 14px; line-height: 1; }
.sh-tog button[aria-pressed="true"] { background: rgba(141,170,255,.18); color: #fff; }
.sh-menu { display: none; border: 1px solid rgba(255,255,255,.2); background: transparent; color: #fff; border-radius: 9px; padding: 7px 11px;
           font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; }
.sh-drop { display: none; border-top: 1px solid rgba(255,255,255,.08); background: var(--navy); padding: 8px 16px 14px; }
.sh-drop a { display: block; padding: 11px 4px; color: #DCE3F1; text-decoration: none; font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.08); }
.sh-drop a.on { color: #fff; font-weight: 700; }
.sh-drop.open { display: block; }
.sh.sh-narrow .sh-nav, .sh.sh-narrow .sh-in > .sh-btn { display: none; }
.sh.sh-narrow .sh-menu { display: block; }
@media (max-width: 1060px) {
  .sh-nav, .sh-in > .sh-btn { display: none; }
  .sh-menu { display: block; }
  .sh-in { gap: 10px; padding: 0 16px; }
}

/* footer */
.sf .sh-logo { color: var(--ink); }
.sf .sh-logo em { color: var(--brand); }
.sf { border-top: 1px solid var(--line); background: var(--surface-2); margin-top: 48px; }
.sf-in { max-width: 1160px; margin: 0 auto; padding: 30px 24px 26px; display: grid; grid-template-columns: 1.2fr 2fr; gap: 24px; }
.sf-about { font-size: 13px; color: var(--ink-4); line-height: 1.55; margin-top: 8px; max-width: 360px; }
.sf-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; font-size: 13px; }
.sf-cols b { display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.sf-cols a { display: block; color: var(--ink-2); text-decoration: none; margin: 4px 0; }
.sf-cols a:hover { color: var(--brand); }
.sf-disc { grid-column: 1 / -1; font-size: 12px; color: var(--ink-4); border-top: 1px solid var(--line); padding-top: 14px; line-height: 1.55; }
@media (max-width: 760px) { .sf-in { grid-template-columns: 1fr; padding: 24px 16px; } .sf-cols { grid-template-columns: 1fr 1fr; } }

/* small shared pieces */
.ui-pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 20px; padding: 2px 9px; background: var(--ok-soft); color: var(--ok); }
.ui-pill.warn { background: var(--warn-soft); color: var(--warn); }
.ui-pill.bad { background: var(--bad-soft); color: var(--bad); }
.ui-ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
@media print { .sh, .sf, .sh-drop { display: none !important; } body { background: #fff; } }
@media (min-width: 1061px) and (max-width: 1220px) { .sh-in { gap: 18px; } .sh-nav { gap: 16px; } }

/* main action button on each tool page: navy (day) / blue (night). "html body" so it wins over page styles */
html body :is(.btn-calculate, #compareBtn, #scanBtn, #btnCalc, #searchBtn, .hm-go) { background: var(--action) !important; color: #fff !important; }
html body :is(.btn-calculate, #compareBtn, #scanBtn, #btnCalc, #searchBtn):hover:not(:disabled),
html body .hm-go:hover { background: var(--action-hover) !important; }
html body :is(.btn-calculate, #compareBtn, #scanBtn, #btnCalc, #searchBtn) { box-shadow: 0 2px 8px rgba(11, 26, 51, .18) !important; }

/* ---- Trade measures panel (dark): calculator, import compliance check, compare tariffs (trade_panel.js) ---- */
.hc-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.hc-h b { color: #fff; font-size: 15px; font-weight: 600; }
.hc-h span { font-size: 12px; color: #9FB0CF; }
.hc-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.04); margin-top: 6px; font-size: 14px; }
.hc-row b { color: #fff; font-weight: 600; }
.hc-row small { color: #9FB0CF; font-size: 12.5px; }
.hc-st { font-size: 13px; font-weight: 600; white-space: nowrap; text-align: right; }
.hc-ic { width: 18px; height: 18px; display: inline-grid; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 800; line-height: 1; }
.hc-yes .hc-ic { background: rgba(52,211,153,.16); color: #34D399; } .hc-yes .hc-st { color: #6EE7B7; }
.hc-dep .hc-ic { background: rgba(251,191,36,.16); color: #FBBF24; } .hc-dep .hc-st { color: #FCD34D; }
.hc-no .hc-ic { background: rgba(255,255,255,.08); color: #9FB0CF; } .hc-no .hc-st { color: #9FB0CF; font-weight: 500; }
.hc-red .hc-ic { background: rgba(248,113,113,.16); color: #F87171; } .hc-red .hc-st { color: #FCA5A5; }
.hc-wait .hc-ic { border: 2px solid rgba(255,255,255,.25); border-top-color: #9DB4FF; animation: hcspin .8s linear infinite; }
.hc-wait .hc-st { color: #9FB0CF; font-weight: 500; }
@keyframes hcspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hc-wait .hc-ic { animation: none; } }
.hc-route { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; color: #9FB0CF; }
.hc-route b { color: #fff; font-weight: 600; }
.hc-route svg { flex: 0 0 auto; }
.hc-foot { font-size: 12px; color: #8C9BBA; margin-top: 8px; line-height: 1.45; }
.hc-map { position: relative; margin: 4px 0 6px; border-radius: 10px; overflow: hidden; background: rgba(0,0,0,.18); }
.hc-map canvas { display: block; width: 100%; height: auto; aspect-ratio: 1434 / 360; max-width: 100%; }
.hc-lbl { position: absolute; transform: translate(-50%, -150%); font-size: 11.5px; color: #fff; background: rgba(11,26,51,.82); border: 1px solid rgba(255,255,255,.16); padding: 1px 7px; border-radius: 99px; white-space: nowrap; opacity: 0; transition: opacity .3s; pointer-events: none; }
.hc-lbl.on { opacity: 1; }
.hc-row.hc-in { animation: hcin .32s ease-out both; }
@keyframes hcin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .hc-row { grid-template-columns: 20px minmax(0, 1fr); } .hc-st { grid-column: 2; text-align: left; } }
@media (prefers-reduced-motion: reduce) { .hc-row.hc-in { animation: none; } .hc-lbl { transition: none; } }

/* ---- Tool pages in the calculator's look (import compliance check, compare tariffs) ---- */
.th { position: relative; background: radial-gradient(120% 140% at 85% 0%, #17305F 0%, var(--navy) 55%); color: #DCE4F2; }
.th-in { max-width: 1240px; margin: 0 auto; padding: 34px 24px 30px; }
.th h1 { margin: 0 0 6px; color: #fff; font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; letter-spacing: -.01em; font-weight: 700; }
.th-sub { margin: 0 0 18px; color: #C3CDE0; font-size: 15.5px; max-width: 64ch; }
.th-bar { display: grid; background: #fff; border-radius: 12px; padding: 5px; box-shadow: 0 10px 30px rgba(0,0,0,.25); color: #0B1A33; }
.th-f { padding: 6px 14px 4px; border-right: 1px solid #E2E6ED; min-width: 0; position: relative; }
.th-f:last-of-type { border-right: 0; }
.th-f > label { display: block; font-size: 12px; font-weight: 600; color: #5F6A82; margin: 0; }
.th-f input, .th-f select { width: 100%; border: 0; background: transparent; padding: 2px 0 4px; font: 500 17px var(--font); color: #0B1A33; min-height: 30px; }
.th-f input::placeholder { color: #8C95A8; font-weight: 400; }
.th-f input:focus, .th-f select:focus { outline: none; }
.th-f:focus-within { background: #F3F6FF; border-radius: 8px; }
.th-go { background: var(--brand, #2F5BEA); color: #fff; border: 0; border-radius: 9px; padding: 0 24px; font: 700 16px var(--font); cursor: pointer; min-height: 54px; }
.th-go:hover:not(:disabled) { filter: brightness(1.08); }
.th-go:disabled { opacity: .6; cursor: default; }
.th-go:focus-visible, .th-link:focus-visible { outline: 2px solid #9DB4FF; outline-offset: 2px; }
.th-meta { margin-top: 12px; color: #C3CDE0; font-size: 13.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.th-meta b { color: #fff; font-weight: 600; }
.th-link { background: none; border: 0; padding: 0; color: #9DB4FF; font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.th-err { margin-top: 12px; background: #FDE8EA; color: #8F2430; border-radius: 9px; padding: 10px 14px; font-size: 14px; line-height: 1.5; }
.th-err:empty { display: none; }
.th-err a { color: inherit; font-weight: 600; }
.tk { max-width: 1240px; margin: 0 auto; padding: 24px 24px 44px; }
.tk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.tk-col { display: grid; gap: 16px; min-width: 0; }
.tk-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; min-width: 0; }
.tk-card h3 { margin: 0 0 4px; font-size: 16px; color: var(--ink); font-weight: 600; }
.tk-k { font-size: 13px; color: var(--ink-3); }
.tk-for { font-size: 13.5px; color: var(--ink-3); margin: 0 0 10px; }
.tk-for b { color: var(--ink); font-weight: 600; }
.tk-big { font-size: clamp(30px, 4.6vw, 40px); font-weight: 700; color: var(--ink); letter-spacing: -.01em; margin: 2px 0 12px; line-height: 1.15; }
.tk-big .q { color: var(--ink-4); font-weight: 600; }
.tk-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tk-tile { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.tk-tile span { display: block; font-size: 13px; color: var(--ink-3); }
.tk-tile b { font-size: 16px; color: var(--ink); }
.tk-tile.bad { border-color: var(--bad); background: var(--bad-soft); }
.tk-tile.bad b { color: var(--bad); }
.tk-fine { font-size: 12.5px; color: var(--ink-4); margin: 10px 0 0; line-height: 1.5; }
.tk-list { margin: 8px 0 0; padding: 0; list-style: none; }
.tk-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14.5px; color: var(--ink-3); }
.tk-list li:first-child { border-top: 0; }
.tk-list li b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tk-acts { display: flex; gap: 10px; flex-wrap: wrap; }
.tk-btn { border: 1px solid var(--line-2); border-radius: 9px; padding: 9px 14px; font-weight: 600; font-size: 14px; color: var(--brand); background: var(--surface); text-decoration: none; }
.tk-btn.p { background: var(--action); color: #fff; border-color: var(--action); }
.tk-btn:hover { text-decoration: underline; }
.tk-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tk-stop { border: 1px solid var(--bad); background: var(--bad-soft); border-radius: 16px; padding: 18px 20px; color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.tk-stop h3 { color: var(--bad); }
.tk-stop ul { margin: 6px 0 8px 18px; }
.tk-p { margin: 0; font-size: 14.5px; color: var(--ink-3); line-height: 1.55; }
.tk-panel { background: linear-gradient(160deg, #13244A 0%, #0B1A33 70%); border-radius: 18px; padding: 18px 20px 18px; color: #E6ECF8; min-width: 0; }
.tk-sec { font-size: 12px; font-weight: 600; color: #9FB0CF; margin: 14px 0 0; }
.tk-wait { min-height: 220px; display: grid; place-items: center; color: #9FB0CF; font-size: 14px; }
@media (max-width: 920px) {
  .tk-grid { grid-template-columns: minmax(0, 1fr); }
  .th-in { padding: 24px 16px 22px; } .tk { padding: 16px 16px 36px; }
  .th-bar { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; }
  .th-f { border-right: 0; border-bottom: 1px solid #E2E6ED; }
  .th-f.wide { grid-column: 1 / -1; }
  .th-go { grid-column: 1 / -1; margin-top: 6px; }
  .th-f input, .th-f select { font-size: 16px; }
}
@media (max-width: 520px) { .tk-tiles { grid-template-columns: minmax(0, 1fr); } .th-f.half { grid-column: 1 / -1; } }
