:root {
  --red: #b83f2a;
  --red-dark: #8f2f21;
  --teal: #0f6d5f;
  --blue: #2f69d9;
  --ink: #191714;
  --muted: #756d63;
  --line: rgba(25, 23, 20, 0.18);
  --paper: #f5efe4;
  --panel: #fffdf8;
  --soft: rgba(255, 250, 240, 0.8);
  --gold: #c4912f;
  --shadow: 0 22px 54px rgba(25, 23, 20, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(25, 23, 20, 0.055) 1px, transparent 1px) 0 0 / 36px 36px,
    linear-gradient(rgba(25, 23, 20, 0.04) 1px, transparent 1px) 0 0 / 36px 36px,
    radial-gradient(circle at 88% 10%, rgba(196, 145, 47, 0.24), transparent 28%),
    linear-gradient(120deg, #f8f3eb, #f1e6d3 72%, #ead9b8);
  font-family: "Aptos", "Microsoft YaHei", "Segoe UI", sans-serif;
}

.page {
  width: min(100% - 34px, 1760px);
  margin: 0 auto;
  padding: 64px 0 32px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 34px;
  align-items: end;
  padding: 28px 0 40px;
  border-bottom: 5px solid var(--ink);
}

.eyebrow {
  margin: 0 0 24px;
  color: var(--teal);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

h1 {
  max-width: 1160px;
  margin: 0;
  font-family: "Palatino Linotype", "Book Antiqua", "STSong", serif;
  font-size: clamp(58px, 7.4vw, 126px);
  line-height: 0.92;
  letter-spacing: -0.045em;
}

.lede {
  max-width: 960px;
  margin: 30px 0 0;
  color: #64605a;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.72;
}

.stamp {
  min-height: 190px;
  display: grid;
  place-items: center;
  border: 3px solid var(--ink);
  background: rgba(255, 250, 240, 0.7);
  box-shadow: 12px 12px 0 rgba(25, 23, 20, 0.08);
  transform: rotate(1.4deg);
}

.stamp span,
.stamp strong {
  display: block;
  font-family: "Cascadia Mono", "Consolas", monospace;
  text-align: center;
}

.stamp span {
  color: var(--muted);
  font-size: 16px;
  font-weight: 900;
}

.stamp strong {
  margin-top: 28px;
  font-size: 62px;
  line-height: 1;
}

.query-card {
  margin: 28px 0 22px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: var(--shadow);
}

.route-row,
.search-row,
.meta-row {
  display: grid;
  gap: 14px;
  align-items: center;
}

.route-row {
  grid-template-columns: 1fr 44px 1fr;
}

.country-card {
  height: 78px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 24px;
  border: 1px solid rgba(25, 23, 20, 0.28);
  background: rgba(255, 250, 240, 0.9);
}

.round {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--red);
  font-size: 32px;
  font-weight: 900;
}

.round.in {
  background: linear-gradient(140deg, var(--red), #d06b32);
}

.round.out {
  background: linear-gradient(140deg, #c63c2e, var(--blue));
}

.country-card strong {
  font-size: 24px;
  font-weight: 900;
}

.swap {
  width: 44px;
  height: 44px;
  border: 0;
  color: #fff;
  background: var(--blue);
  font-size: 28px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease;
}

.swap:hover {
  background: var(--teal);
  transform: translateY(-1px);
}

.search-row {
  grid-template-columns: minmax(360px, 1fr) 180px 168px;
  margin-top: 14px;
}

.hs-input {
  position: relative;
  height: 66px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  border: 1px solid rgba(25, 23, 20, 0.3);
  background: #fffdf8;
}

.hs-mark {
  color: var(--red);
  border: 2px solid var(--red);
  border-radius: 8px;
  padding: 3px 6px;
  font-size: 29px;
  font-weight: 900;
  line-height: 1;
}

input,
select,
button {
  font: inherit;
}

input,
select {
  color: var(--ink);
  background: #fffdf8;
}

.hs-input input {
  width: 100%;
  border: 0;
  outline: 0;
  font-size: 20px;
  font-weight: 800;
}

.suggestions {
  position: absolute;
  z-index: 20;
  left: -1px;
  right: -1px;
  top: calc(100% + 8px);
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid rgba(25, 23, 20, 0.28);
  background: #fffdf8;
  box-shadow: 0 18px 38px rgba(25, 23, 20, 0.16);
}

.suggestion-item {
  width: 100%;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 14px;
  align-items: center;
  padding: 13px 16px;
  border: 0;
  border-bottom: 1px solid rgba(25, 23, 20, 0.09);
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(196, 145, 47, 0.14);
}

.suggestion-item strong {
  color: var(--teal);
  font-family: "Cascadia Mono", "Consolas", monospace;
  font-size: 15px;
}

.suggestion-item span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

select {
  height: 66px;
  padding: 0 14px;
  border: 1px solid rgba(25, 23, 20, 0.28);
  font-weight: 800;
}

#search-button,
#export-current {
  height: 66px;
  border: 0;
  color: #fff;
  background: #c84b37;
  cursor: pointer;
  font-weight: 900;
  transition: background 160ms ease, transform 160ms ease;
}

#search-button:hover,
#export-current:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.meta-row {
  grid-template-columns: 1fr;
  margin-top: 14px;
  color: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.result-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-head strong {
  display: block;
  margin-bottom: 5px;
  color: var(--teal);
  font-size: 15px;
}

.panel-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

#export-current {
  min-width: 160px;
  height: 44px;
  background: #0878e6;
}

.table-wrap {
  overflow-x: auto;
}

.result-table {
  width: 100%;
  min-width: 1780px;
  border-collapse: collapse;
  table-layout: auto;
  border-top: 3px solid var(--ink);
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid rgba(25, 23, 20, 0.07);
  text-align: left;
  vertical-align: middle;
  word-break: break-word;
}

.policy-name,
.date-cell {
  white-space: nowrap;
}

.list-content {
  min-width: 290px;
}

.source-path {
  min-width: 330px;
  max-width: 430px;
}

.official-link {
  display: inline;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: rgba(0, 92, 87, 0.35);
  text-underline-offset: 3px;
  white-space: normal;
}

.official-link:hover {
  color: var(--red);
  text-decoration-color: currentColor;
}

th:last-child,
td:last-child {
  border-right: 0;
}

th {
  background: rgba(25, 23, 20, 0.055);
  color: var(--ink);
  font-size: 15px;
  font-weight: 950;
}

th:nth-child(1),
td:nth-child(1) { min-width: 150px; }
th:nth-child(2),
td:nth-child(2) { min-width: 230px; }
th:nth-child(3),
td:nth-child(3) { min-width: 110px; }
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6),
th:nth-child(10),
td:nth-child(10) { min-width: 96px; }
th:nth-child(7),
td:nth-child(7) { min-width: 185px; }
th:nth-child(8),
td:nth-child(8),
th:nth-child(9),
td:nth-child(9) { min-width: 165px; }
th:nth-child(11),
td:nth-child(11) { min-width: 360px; }
th:nth-child(12),
td:nth-child(12) { min-width: 116px; }

td {
  color: #7a7268;
  font-size: 15px;
  font-weight: 750;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 14px;
  border-radius: 5px;
  color: #fff;
  background: var(--red);
  font-weight: 900;
}

.badge.pending {
  color: var(--ink);
  background: #eadfc9;
}

.badge.exempt {
  color: #fff;
  background: var(--teal);
}

.badge.historical {
  color: #fffdf8;
  background: #8a7b68;
}

.empty {
  height: 104px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1050px) {
  .page {
    width: min(100% - 22px, 1760px);
    padding-top: 32px;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .stamp {
    width: 220px;
  }

  .route-row,
  .search-row,
  .meta-row {
    grid-template-columns: 1fr;
  }

  .swap {
    justify-self: center;
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Unified HicYun theme, aligned with TradeCompliance Web. */
:root {
  --red: #1677ff;
  --red-dark: #0b5fd7;
  --teal: #05a9bb;
  --blue: #1677ff;
  --ink: #102033;
  --muted: #66758a;
  --line: rgba(116, 139, 166, 0.24);
  --paper: #eef5fb;
  --panel: rgba(255, 255, 255, 0.86);
  --soft: rgba(255, 255, 255, 0.76);
  --gold: #05b7c8;
  --shadow: 0 24px 70px rgba(25, 57, 99, 0.14);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 10%, rgba(22, 119, 255, 0.18), transparent 30%),
    radial-gradient(circle at 88% 4%, rgba(5, 183, 200, 0.20), transparent 28%),
    linear-gradient(135deg, #f8fbff 0%, #edf5fb 48%, #e9f1ff 100%);
  font-family: "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
}

.page { padding-top: 26px; }
.hero {
  align-items: center;
  padding: 26px 30px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.eyebrow { margin-bottom: 14px; color: #2382ff; font-size: 12px; letter-spacing: 0.12em; }
h1 {
  max-width: 820px;
  font-family: inherit;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.04em;
}
.lede {
  max-width: 900px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  line-height: 1.7;
}
.stamp {
  min-height: 136px;
  border: 1px solid rgba(22, 119, 255, 0.18);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.10), rgba(5, 183, 200, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.70);
  transform: none;
}
.stamp span { color: var(--muted); font-size: 12px; }
.stamp strong { margin-top: 16px; color: var(--blue); font-size: 38px; }

.query-card,
.result-panel {
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.result-panel { overflow: hidden; }
.country-card {
  border-color: var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}
.round { background: linear-gradient(140deg, var(--blue), var(--teal)); font-size: 26px; }
.round.out { background: linear-gradient(140deg, #0b5fd7, var(--blue)); }
.round.in { background: linear-gradient(140deg, var(--blue), var(--teal)); }
.swap { border-radius: 14px; background: var(--blue); }

.hs-input,
select,
input {
  border-color: var(--line);
  background: #fff;
}
.hs-input,
select { border-radius: 18px; }
.suggestions {
  border-color: var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(25, 57, 99, 0.14);
}
.suggestion-item:hover { background: rgba(22, 119, 255, 0.08); }
#search-button,
#export-current {
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 14px 28px rgba(22, 119, 255, 0.20);
}
#search-button:hover,
#export-current:hover { background: linear-gradient(135deg, #0b5fd7, #0497aa); }
.meta-row,
.panel-head strong,
.official-link { color: #1d6dbb; }

.result-table { border-top-color: rgba(22, 119, 255, 0.18); }
th {
  background: rgba(22, 119, 255, 0.06);
  color: var(--ink);
  white-space: nowrap;
  word-break: keep-all;
}
th:nth-child(3),
td:nth-child(3) { min-width: 138px; }
th:nth-child(4),
td:nth-child(4),
th:nth-child(5),
td:nth-child(5),
th:nth-child(6),
td:nth-child(6),
th:nth-child(10),
td:nth-child(10) { min-width: 112px; }
th:nth-child(11),
td:nth-child(11) { min-width: 148px; }
th:nth-child(12),
td:nth-child(12) { min-width: 360px; }
th:nth-child(13),
td:nth-child(13) { min-width: 116px; }
.final-duty {
  color: #0b66d4;
  font-weight: 900;
  white-space: nowrap;
}
.final-duty.confirmed { color: #0b8f67; }
td { color: #52647a; }
.badge { border-radius: 999px; background: var(--blue); }
.badge.pending { background: #eaf1ff; color: #1d5fae; }
.badge.exempt { background: #14a46f; }
.badge.historical { background: #71839a; color: #fff; }

@media (max-width: 1050px) {
  .page { padding-top: 14px; }
  .hero { padding: 22px; }
  h1 { font-size: clamp(28px, 8vw, 38px); }
  .stamp { width: 100%; min-height: 100px; }
}
