:root {
  --hs-blue-900: #102a56;
  --hs-blue-700: #164c96;
  --hs-blue-600: #1769c2;
  --hs-blue-100: #e9f2fc;
  --hs-blue-50: #f5f9fe;
  --hs-ink: #18243a;
  --hs-muted: #65738a;
  --hs-line: #dfe6ef;
  --hs-surface: #ffffff;
  --hs-canvas: #f5f7fa;
  --hs-note: #fff9d9;
  --hs-note-line: #eed97d;
  --hs-success: #17824b;
  --hs-danger: #c94a43;
  --hs-radius: 10px;
  --hs-shadow: 0 12px 36px rgba(32, 55, 90, 0.08);
}

.hs-page {
  padding-top: 80px;
  background: var(--hs-canvas);
  color: var(--hs-ink);
}

.hs-page [hidden] {
  display: none !important;
}

.hs-page *,
.hs-page *::before,
.hs-page *::after {
  box-sizing: border-box;
}

.hs-page button,
.hs-page input,
.hs-page select {
  font: inherit;
}

.hs-page button,
.hs-page a,
.hs-page input,
.hs-page select {
  outline-offset: 3px;
}

.hs-page button:focus-visible,
.hs-page a:focus-visible,
.hs-page input:focus-visible,
.hs-page select:focus-visible {
  outline: 2px solid var(--hs-blue-600);
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.hs-container {
  width: min(1380px, calc(100% - 48px));
  margin-inline: auto;
}

.hs-hero {
  position: relative;
  overflow: visible;
  color: #fff;
  background:
    radial-gradient(circle at 78% 12%, rgba(88, 169, 246, 0.32), transparent 30%),
    linear-gradient(112deg, #0d2d5f, #1764ad);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hs-hero::after {
  content: "HS";
  position: absolute;
  right: 4%;
  bottom: -42px;
  color: rgba(255, 255, 255, 0.05);
  font: 800 180px/1 Arial, sans-serif;
  letter-spacing: -12px;
  pointer-events: none;
}

.hs-hero__inner {
  min-height: 210px;
  padding-block: 38px 46px;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(460px, 1.2fr);
  align-items: center;
  gap: 72px;
}

.hs-eyebrow,
.hs-panel-kicker {
  margin: 0 0 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.hs-eyebrow { color: #9dccff; }
.hs-panel-kicker { color: var(--hs-blue-600); }

.hs-hero h1 {
  margin: 0 0 12px;
  color: #fff;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.hs-hero p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 15px;
}

.hs-search {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  height: 58px;
  padding-inline: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(1, 25, 58, 0.22);
}

.hs-search > svg {
  width: 22px;
  margin-right: 12px;
  fill: none;
  stroke: var(--hs-blue-600);
  stroke-width: 2;
}

.hs-search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0 !important;
  color: var(--hs-ink);
  font-size: 15px;
  background: transparent;
  box-shadow: none !important;
  outline: 0 !important;
  appearance: none;
}

.hs-search > button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--hs-muted);
  background: var(--hs-blue-50);
  cursor: pointer;
}

.hs-search-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  right: 0;
  left: 0;
  max-height: 420px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius);
  background: #fff;
  box-shadow: var(--hs-shadow);
}

.hs-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  border: 0;
  border-radius: 6px;
  color: var(--hs-ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.hs-search-result:hover,
.hs-search-result[aria-selected="true"] { background: var(--hs-blue-50); }

.hs-search-result__code,
.hs-code {
  color: #0e59d4;
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.hs-search-result__meta {
  color: var(--hs-muted);
  font-size: 12px;
}

.hs-workspace {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  padding-block: 24px 52px;
}

.hs-tree-panel,
.hs-results {
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius);
  background: var(--hs-surface);
  box-shadow: var(--hs-shadow);
}

.hs-tree-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: hidden;
}

.hs-panel-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 12px;
}

.hs-panel-heading h2,
.hs-results-toolbar h2 {
  margin: 0;
  color: var(--hs-ink);
  font-size: 20px;
}

.hs-icon-button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--hs-line);
  border-radius: 6px;
  color: var(--hs-blue-700);
  background: #fff;
  cursor: pointer;
}

.hs-tree-help {
  margin: 0;
  padding: 0 20px 14px;
  color: var(--hs-muted);
  font-size: 12px;
  border-bottom: 1px solid var(--hs-line);
}

.hs-tree {
  max-height: calc(100vh - 146px);
  overflow: auto;
  padding: 10px 8px 18px;
  scrollbar-width: thin;
}

.hs-tree-node { margin: 2px 0; }
.hs-tree-children[hidden] { display: none; }

.hs-tree-row {
  width: 100%;
  min-height: 38px;
  display: grid;
  grid-template-columns: 24px auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 0;
  border-radius: 7px;
  color: var(--hs-ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.hs-tree-row:hover { background: var(--hs-blue-50); }
.hs-tree-row.is-active { color: var(--hs-blue-900); background: #e3f0ff; }
.hs-tree-row--chapter { padding-left: 24px; }
.hs-tree-row--heading { padding-left: 48px; }

.hs-tree-toggle {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d7e1ee;
  border-radius: 6px;
  color: var(--hs-blue-600);
  background: #fff;
  font-weight: 700;
}

.hs-tree-toggle--leaf { border-color: transparent; background: transparent; }

.hs-tree-code {
  min-width: 34px;
  padding: 3px 6px;
  border-radius: 5px;
  color: #0d7f68;
  background: #ecfaf6;
  font: 700 11px/1.4 "Cascadia Mono", Consolas, monospace;
  text-align: center;
}

.hs-tree-row--section .hs-tree-code {
  color: #c7511b;
  background: #fff2ea;
}

.hs-tree-row--heading .hs-tree-code {
  color: #185bcc;
  background: #edf4ff;
}

.hs-tree-name {
  overflow: hidden;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-tree-count {
  min-width: 24px;
  color: var(--hs-muted);
  font-size: 11px;
  text-align: right;
}

.hs-results { min-width: 0; overflow: hidden; }

.hs-breadcrumb {
  min-height: 49px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hs-line);
  color: var(--hs-muted);
  font-size: 12px;
}

.hs-breadcrumb button {
  padding: 0;
  border: 0;
  color: var(--hs-blue-600);
  background: transparent;
  cursor: pointer;
}

.hs-breadcrumb__current { color: var(--hs-ink); font-weight: 600; }

.hs-note {
  margin: 16px 20px 0;
  border: 1px solid var(--hs-note-line);
  border-radius: 8px;
  background: var(--hs-note);
}

.hs-note__toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 0;
  color: #7a4b09;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.hs-note__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid #d7a522;
  border-radius: 4px;
  font-size: 12px;
}

.hs-note__chevron { text-align: center; transition: transform 180ms ease; }
.hs-note__toggle[aria-expanded="false"] .hs-note__chevron { transform: rotate(180deg); }

.hs-note__body {
  padding: 0 14px 14px 50px;
  color: #6e4b18;
  font-size: 13px;
  line-height: 1.75;
  white-space: pre-line;
}

.hs-results-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 20px;
}

.hs-result-summary { margin: 7px 0 0; color: var(--hs-muted); font-size: 12px; }

.hs-filters {
  display: grid;
  grid-template-columns: auto minmax(180px, 240px) 112px;
  align-items: center;
  gap: 8px;
}

.hs-filters label { color: var(--hs-muted); font-size: 12px; }

.hs-filters input,
.hs-filters select,
.hs-pagination select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--hs-line);
  border-radius: 6px;
  color: var(--hs-ink);
  background: #fff;
}

.hs-table-wrap { overflow-x: auto; border-top: 1px solid var(--hs-line); }

.hs-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
  table-layout: fixed;
}

.hs-table th,
.hs-table td {
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.hs-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #42516a;
  background: #f7f9fc;
  font-weight: 700;
}

.hs-table th:nth-child(1) { width: 142px; }
.hs-table th:nth-child(2) { width: 116px; }
.hs-table th:nth-child(3) { width: auto; }
.hs-table th:nth-child(4) { width: 88px; }
.hs-table th:nth-child(5),
.hs-table th:nth-child(6) { width: 94px; }
.hs-table th:nth-child(7) { width: 72px; }

.hs-table tbody tr:hover { background: #fbfdff; }

.hs-code-link {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  color: #0f5bd4;
  background: #edf4ff;
  font-family: "Cascadia Mono", Consolas, monospace;
  text-decoration: none;
  white-space: nowrap;
}

.hs-goods-name { color: var(--hs-ink); line-height: 1.55; }
.hs-cell-muted { color: var(--hs-muted); }

.hs-status {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.hs-status::before { content: ""; width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; }
.hs-status--active { color: var(--hs-success); background: #eaf8f0; }
.hs-status--active::before { background: var(--hs-success); }
.hs-status--expired { color: var(--hs-danger); background: #fff0ef; }
.hs-status--expired::before { background: var(--hs-danger); }

.hs-state {
  min-height: 320px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  padding: 36px;
  border-top: 1px solid var(--hs-line);
  color: var(--hs-muted);
  text-align: center;
}

.hs-state__title { margin: 0; color: var(--hs-ink); font-size: 16px; }
.hs-state p { margin: 0; }

.hs-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid var(--hs-blue-100);
  border-top-color: var(--hs-blue-600);
  border-radius: 50%;
  animation: hs-spin 700ms linear infinite;
}

@keyframes hs-spin { to { transform: rotate(360deg); } }

.hs-skeleton {
  height: 38px;
  margin: 8px;
  border-radius: 6px;
  background: linear-gradient(90deg, #f1f4f8, #f9fbfd, #f1f4f8);
  background-size: 200% 100%;
  animation: hs-shimmer 1.2s infinite;
}

@keyframes hs-shimmer { to { background-position: -200% 0; } }

.hs-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 62px;
  padding: 12px 20px;
  color: var(--hs-muted);
  font-size: 12px;
  border-top: 1px solid var(--hs-line);
}

.hs-pagination__summary { display: flex; align-items: center; gap: 7px; }
.hs-pagination select { height: 32px; }
.hs-page-buttons { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.hs-page-button {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hs-line);
  border-radius: 6px;
  color: #42516a;
  background: #fff;
  cursor: pointer;
}

.hs-page-button:hover:not(:disabled) { border-color: var(--hs-blue-600); color: var(--hs-blue-600); }
.hs-page-button.is-current { border-color: var(--hs-blue-600); color: #fff; background: var(--hs-blue-600); }
.hs-page-button:disabled { opacity: 0.45; cursor: not-allowed; }

.hs-mobile-tree-toggle { display: none; }

.hs-detail-main {
  min-height: 70vh;
  padding-block: 28px 56px;
  background:
    linear-gradient(180deg, #edf5ff 0, #f5f7fa 220px),
    var(--hs-canvas);
}

.hs-back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 16px;
  color: var(--hs-blue-600);
  font-size: 13px;
  text-decoration: none;
}

.hs-detail-state,
.hs-detail {
  border: 1px solid var(--hs-line);
  border-radius: var(--hs-radius);
  background: #fff;
  box-shadow: var(--hs-shadow);
}

.hs-detail-breadcrumb a {
  color: var(--hs-blue-600);
  text-decoration: none;
}

.hs-detail-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 34px 36px;
  border-bottom: 1px solid var(--hs-line);
  background:
    linear-gradient(100deg, rgba(23, 105, 194, 0.06), transparent 55%),
    #fff;
}

.hs-detail-code-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hs-detail-code {
  color: var(--hs-blue-700);
  font: 700 18px/1.2 "Cascadia Mono", Consolas, monospace;
}

.hs-detail-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--hs-ink);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.28;
}

.hs-detail-description {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--hs-muted);
  font-size: 14px;
  line-height: 1.7;
}

.hs-detail-standard {
  min-width: 220px;
  padding: 20px 22px;
  border-left: 3px solid var(--hs-blue-600);
  background: var(--hs-blue-50);
}

.hs-detail-standard span {
  display: block;
  margin-bottom: 6px;
  color: var(--hs-muted);
  font-size: 12px;
}

.hs-detail-standard strong {
  color: var(--hs-blue-900);
  font: 700 22px/1.3 "Cascadia Mono", Consolas, monospace;
}

.hs-detail-section {
  margin: 20px;
  border: 1px solid var(--hs-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.hs-detail-section__heading {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--hs-line);
  background: #fbfcfe;
}

.hs-detail-section__heading--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hs-detail-section__heading h2 {
  margin: 0;
  color: var(--hs-ink);
  font-size: 18px;
}

.hs-definition-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
}

.hs-definition-grid > div {
  min-height: 92px;
  padding: 18px 20px;
  border-right: 1px solid var(--hs-line);
  border-bottom: 1px solid var(--hs-line);
}

.hs-definition-grid > div:nth-child(4n) { border-right: 0; }
.hs-definition-grid > div:nth-last-child(-n + 4) { border-bottom: 0; }

.hs-definition-grid dt,
.hs-metric-grid dt {
  margin-bottom: 8px;
  color: var(--hs-muted);
  font-size: 12px;
}

.hs-definition-grid dd,
.hs-metric-grid dd {
  margin: 0;
  color: var(--hs-ink);
  font-size: 14px;
  line-height: 1.55;
}

.hs-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  background: var(--hs-line);
}

.hs-metric-grid > div {
  min-height: 98px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 18px 20px;
  background: #fff;
}

.hs-metric-grid dd {
  color: var(--hs-blue-700);
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.hs-detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 20px;
}

.hs-detail-columns .hs-detail-section { margin: 0; }

.hs-detail-list {
  margin: 0;
  padding: 12px 20px 18px 58px;
}

.hs-detail-list li {
  padding: 9px 6px;
  color: #344157;
  font-size: 13px;
  line-height: 1.5;
  border-bottom: 1px dashed var(--hs-line);
}

.hs-detail-list li:last-child { border-bottom: 0; }

.hs-condition-list { padding: 16px 20px; }

.hs-condition-group + .hs-condition-group {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--hs-line);
}

.hs-condition-group h3 {
  margin: 0 0 10px;
  color: var(--hs-ink);
  font-size: 14px;
}

.hs-condition-group p {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 8px 0;
  color: #49566b;
  font-size: 13px;
  line-height: 1.55;
}

.hs-condition-code {
  min-width: 28px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--hs-blue-700);
  background: var(--hs-blue-100);
  font-family: "Cascadia Mono", Consolas, monospace;
  text-align: center;
}

.hs-detail-count {
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--hs-blue-700);
  background: var(--hs-blue-100);
  font-size: 12px;
}

.hs-ciq-table { min-width: 640px; }
.hs-ciq-table th:first-child { width: 230px; }

@media (max-width: 900px) {
  .hs-detail-hero { align-items: stretch; flex-direction: column; padding: 26px 22px; }
  .hs-detail-standard { width: 100%; }
  .hs-definition-grid,
  .hs-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hs-definition-grid > div:nth-child(2n) { border-right: 0; }
  .hs-definition-grid > div:nth-last-child(-n + 4) { border-bottom: 1px solid var(--hs-line); }
  .hs-definition-grid > div:nth-last-child(-n + 2) { border-bottom: 0; }
  .hs-detail-columns { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .hs-detail-main { padding-top: 18px; }
  .hs-detail-hero { padding: 22px 16px; }
  .hs-detail-standard { min-width: 0; }
  .hs-detail-section { margin: 12px; }
  .hs-detail-columns { gap: 12px; margin: 12px; }
  .hs-definition-grid,
  .hs-metric-grid { grid-template-columns: 1fr; }
  .hs-definition-grid > div { border-right: 0; }
  .hs-definition-grid > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--hs-line); }
  .hs-definition-grid > div:last-child { border-bottom: 0; }
}

@media (max-width: 1100px) {
  .hs-container { width: min(100% - 32px, 980px); }
  .hs-hero__inner { grid-template-columns: 1fr; gap: 24px; }
  .hs-workspace { grid-template-columns: 290px minmax(0, 1fr); }
  .hs-results-toolbar { align-items: stretch; flex-direction: column; }
  .hs-filters { grid-template-columns: auto minmax(0, 1fr) 112px; }
}

@media (max-width: 820px) {
  .hs-container { width: calc(100% - 24px); }
  .hs-hero__inner { min-height: auto; padding-block: 28px 34px; }
  .hs-hero::after { font-size: 110px; }
  .hs-workspace { display: block; padding-top: 14px; }
  .hs-mobile-tree-toggle {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 13px 16px;
    border: 1px solid var(--hs-line);
    border-radius: 8px;
    color: var(--hs-blue-900);
    background: #fff;
    font-weight: 700;
  }
  .hs-tree-panel { position: static; max-height: none; margin-bottom: 12px; }
  .hs-tree-panel:not(.is-mobile-open) { display: none; }
  .hs-tree { max-height: 58vh; }
  .hs-note { margin-inline: 12px; }
  .hs-results-toolbar { padding: 16px 12px; }
  .hs-filters { grid-template-columns: 1fr 112px; }
  .hs-filters > label:first-child { grid-column: 1 / -1; }
  .hs-pagination { align-items: flex-start; flex-direction: column; }
  .hs-page-buttons { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .hs-hero__inner { gap: 18px; }
  .hs-search { height: 52px; }
  .hs-search-result { grid-template-columns: 96px minmax(0, 1fr); }
  .hs-search-result__meta { display: none; }
  .hs-breadcrumb { padding-inline: 12px; }
  .hs-note__body { padding-left: 14px; }
  .hs-filters { grid-template-columns: 1fr; }
  .hs-pagination { padding-inline: 12px; }
  .hs-pagination__summary { flex-wrap: wrap; }
  .hs-page-button { min-width: 32px; padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hs-page *,
  .hs-page *::before,
  .hs-page *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
