@font-face {
  font-family: "Noto Sans SC Locations";
  src: url("../assets/noto-sans-sc-locations.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Noto Sans SC";
  src: url("../assets/noto-sans-sc.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

@font-face {
  font-family: "Studio Mono";
  src: url("../assets/ibm-plex-mono.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  --white: #ffffff;
  --slate-25: #f4f6fa;
  --slate-50: #f7f9fc;
  --slate-150: #e2e8f2;
  --slate-250: #d7e0ed;
  --slate-500: #5a6b83;
  --slate-650: #40526c;
  --slate-950: #172336;
  --blue-50: #edf4ff;
  --blue-100: #e9f0ff;
  --blue-200: #d8e7ff;
  --blue-300: #adc5fa;
  --blue-400: #6695f3;
  --blue-650: #2355d9;
  --blue-750: #1744bc;
  --teal-50: #e4f5ec;
  --teal-750: #126648;
  --red-700: #af293a;
  --surface-page: var(--slate-25);
  --surface-panel: var(--white);
  --surface-subtle: var(--slate-50);
  --surface-selected: var(--blue-50);
  --border: var(--slate-150);
  --border-control: var(--slate-250);
  --text: var(--slate-950);
  --text-muted: var(--slate-500);
  --action: var(--blue-650);
  --action-hover: var(--blue-750);
  --focus: var(--blue-650);
  --positive-bg: var(--teal-50);
  --positive-text: var(--teal-750);
  --danger: var(--red-700);
  --radius: 8px;
  --mono: "Studio Mono", Consolas, monospace;
  --sans:
    "Noto Sans SC", "Noto Sans SC Locations", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  color-scheme: light;
  font-family: var(--sans);
  color: var(--text);
  background: var(--surface-page);
  font-size: 14px;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  min-height: 100dvh;
}
p,
h1,
h2,
h3,
dl,
dd {
  margin: 0;
}
a {
  color: var(--action);
  text-decoration: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: default;
}
button,
input,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
section[id] {
  scroll-margin-top: 22px;
}
.results {
  scroll-margin-top: 12px;
}

.layout {
  width: min(1264px, calc(100% - 72px));
  margin-inline: auto;
}
.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 16px;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--white);
  transform: translateY(-160%);
}
.skip-link:focus {
  transform: translateY(0);
}

.topbar {
  height: 66px;
  background: var(--surface-panel);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  height: 100%;
}
.brand,
.nav {
  display: flex;
  align-items: center;
}
.brand {
  gap: 11px;
  color: var(--text);
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.brand-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--action);
  color: var(--white);
}
.brand-icon .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.9;
}
.nav {
  justify-content: flex-end;
  gap: 26px;
  height: 100%;
}
.nav a {
  display: flex;
  align-items: center;
  height: 100%;
  padding-inline: 3px;
  color: var(--text-muted);
  font-weight: 550;
  position: relative;
  white-space: nowrap;
}
.nav a:hover,
.nav a[aria-current] {
  color: var(--action);
}
.nav a[aria-current]::after {
  content: "";
  position: absolute;
  inset: auto 3px 0;
  height: 2px;
  background: var(--action);
}

.hero {
  background: var(--surface-panel);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  min-height: 202px;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  padding-block: 9px;
}
.hero-copy {
  min-width: 0;
}
.hero h1 {
  font-size: clamp(34px, 3.65vw, 52px);
  line-height: 1.2;
  font-weight: 810;
  letter-spacing: -0.055em;
}
.hero h1 span {
  color: var(--action);
}
.hero-copy > p {
  margin-top: 13px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-muted);
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 13px;
  color: var(--slate-650);
  font-size: 12px;
  font-weight: 560;
}
.hero-meta::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--action);
}
.source-link,
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.source-link .icon {
  width: 15px;
  height: 15px;
}
.source-link:hover,
.site-footer a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.hero h1 #market-title {
  color: var(--text);
}
.market-picker {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border-control);
  border-radius: 7px;
  background: var(--surface-subtle);
  white-space: nowrap;
}
.market-picker button {
  border: 0;
  border-radius: 4px;
  padding: 5px 11px;
  color: var(--text-muted);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}
.market-picker button[aria-pressed="true"] {
  color: var(--action-hover);
  background: var(--surface-panel);
  box-shadow: 0 1px 3px #182c4d24;
}
.market-picker button[aria-pressed="false"]:hover {
  color: var(--action);
  background: var(--surface-selected);
}
.domestic-preview {
  width: min(100%, 360px);
  justify-self: end;
  padding-inline: 0;
}
.domestic-address {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  overflow-wrap: anywhere;
}
.domestic-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  color: var(--action);
  background: var(--surface-selected);
  border-radius: 7px;
}
.domestic-caption,
#cn-preview-street {
  color: var(--text-muted);
  font-size: 12px;
}
#cn-preview-location {
  font-size: 20px;
  font-weight: 750;
  margin-block: 4px;
}
.fixture-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}
#summary-name[lang="zh-CN"],
#summary-street[lang="zh-CN"],
#summary-location[lang="zh-CN"],
#code-preview[lang="zh-CN"] {
  font-family: "Studio Mono", var(--sans);
}
.map {
  width: min(100%, 345px);
  aspect-ratio: 1140/610;
  justify-self: end;
  align-self: center;
  position: relative;
}
.map::before {
  content: "";
  position: absolute;
  inset: 1% -2% 1% -4%;
  background: radial-gradient(
      circle at 1px 1px,
      #7699d84d 1px,
      transparent 1.1px
    )
    0 0/15px 15px;
  mask-image: radial-gradient(ellipse at center, #000 33%, transparent 77%);
}
.map canvas,
.map-markers {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
}
.map-markers {
  pointer-events: none;
}
.map-marker {
  pointer-events: auto;
  position: absolute;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  border: 1px solid #bacdf3;
  background: var(--white);
  color: var(--action-hover);
  font: 500 10px/1 var(--mono);
  padding: 4px 5px;
  box-shadow: 0 1px 3px #2a53a51b;
}
.map-marker:hover,
.map-marker:focus-visible {
  color: var(--white);
  background: var(--action);
  border-color: var(--action);
}
.map-legend {
  display: flex;
  align-items: center;
  gap: 7px;
  position: absolute;
  right: 3%;
  bottom: 4%;
  color: var(--slate-650);
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}
.map-legend i,
.tax-badge i {
  width: 7px;
  height: 7px;
  border-radius: 100%;
  background: var(--blue-400);
}
.map:not(.ready) .map-legend {
  display: none;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(280px, 312px) minmax(0, 1fr);
  margin-top: 22px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-panel);
}
.panel {
  min-width: 0;
}
.controls {
  border-inline-end: 1px solid var(--border);
  border-start-start-radius: inherit;
  border-end-start-radius: inherit;
  background: var(--surface-subtle);
}
.panel-heading {
  min-height: 60px;
  padding-inline: 21px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.panel-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 7px;
  color: var(--action);
  background: var(--blue-100);
}
.panel-icon .icon {
  width: 17px;
  height: 17px;
}
.panel-heading h2 {
  font-size: 17px;
  line-height: 1.3;
  font-weight: 740;
  white-space: nowrap;
}
.text-button,
.state-action {
  border: 0;
  background: transparent;
  color: var(--action);
  padding: 0;
  font-size: 12px;
  font-weight: 620;
}
.text-button:hover,
.state-action:hover {
  color: var(--action-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.reset {
  margin-inline-start: auto;
  color: var(--text-muted);
}

#filters {
  padding: 18px 21px 21px;
  display: grid;
  gap: 13px;
}
.input-group {
  display: grid;
  gap: 7px;
  align-content: start;
  min-width: 0;
}
.input-group label,
.toggle-row label {
  font-size: 13px;
  font-weight: 670;
}
.input-group label span {
  font-size: 11px;
  font-weight: 480;
  color: var(--text-muted);
  margin-left: 3px;
}
.input-group input,
.input-group select {
  width: 100%;
  height: 41px;
  min-width: 0;
  border: 1px solid var(--border-control);
  border-radius: 7px;
  padding: 0 11px;
  background: var(--white);
  color: var(--text);
  font-size: 13px;
}
.input-group input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
.input-group input:hover,
.input-group select:hover {
  border-color: var(--blue-300);
}
.input-group [aria-invalid="true"] {
  border-color: var(--danger);
}
.select-wrap {
  position: relative;
}
.select-wrap select {
  appearance: none;
  padding-right: 27px;
  text-overflow: ellipsis;
  cursor: pointer;
}
.select-wrap .icon {
  position: absolute;
  right: 9px;
  top: 12px;
  width: 16px;
  height: 16px;
  pointer-events: none;
  color: var(--text-muted);
}
.form-columns {
  display: grid;
  grid-template-columns: 1fr 0.83fr;
  gap: 12px;
}
.field-error {
  font-size: 12px;
  line-height: 1.5;
  color: var(--danger);
}
.form-error {
  margin-top: -7px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 2px;
}
.toggle-row label {
  cursor: pointer;
}
.toggle-row p {
  color: var(--text-muted);
  font-size: 11px;
  margin-top: 3px;
}
.switch {
  appearance: none;
  position: relative;
  width: 38px;
  height: 22px;
  border: 1px solid #9aaac1;
  border-radius: 14px;
  background: #e6edf6;
  cursor: pointer;
  margin: 0 1px 0 0;
  flex: none;
  transition: background 0.15s;
}
.switch::before {
  content: "";
  position: absolute;
  inset: 2px auto auto 2px;
  width: 16px;
  height: 16px;
  border-radius: 100%;
  background: var(--white);
  box-shadow: 0 1px 4px #1f38533b;
  transition: transform 0.15s;
}
.switch:checked {
  background: var(--action);
  border-color: var(--action);
}
.switch:checked::before {
  transform: translateX(16px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
  white-space: nowrap;
}
.button .icon {
  width: 16px;
  height: 16px;
}
.button-primary {
  background: var(--action);
  color: var(--white);
}
.button-primary:hover {
  background: var(--action-hover);
}
.button-primary:disabled {
  opacity: 0.69;
}
.generate {
  width: 100%;
  min-height: 44px;
  font-size: 14px;
  gap: 8px;
}
.generate .icon {
  width: 19px;
  height: 19px;
}
.button-outline {
  border-color: var(--border-control);
  background: var(--white);
  color: var(--slate-650);
}
.button-outline:hover {
  background: var(--surface-subtle);
}
.button-soft {
  border-color: var(--blue-200);
  background: var(--blue-50);
  color: var(--action-hover);
}
.button-soft:hover {
  background: var(--blue-100);
}
.button-outline:disabled,
.button-soft:disabled {
  opacity: 0.62;
}

.results {
  display: flex;
  flex-direction: column;
}
.result-heading {
  min-width: 0;
}
.sample-label {
  border-radius: 5px;
  flex: none;
  color: var(--slate-650);
  background: var(--surface-subtle);
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 590;
}
.result-actions {
  margin-inline-start: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  column-gap: 14px;
  padding-inline: 21px;
  border-bottom: 1px solid var(--border);
}
.result-tabs {
  display: flex;
  align-items: stretch;
  gap: 24px;
  min-height: 46px;
}
.result-toolbar .pagination {
  margin-inline-start: auto;
  min-height: 33px;
}
.result-tabs button {
  position: relative;
  padding: 0 2px;
  color: var(--text-muted);
  background: transparent;
  border: 0;
  font-size: 13px;
  font-weight: 620;
}
.result-tabs button[aria-selected="true"],
.result-tabs button:hover {
  color: var(--action);
}
.result-tabs button[aria-selected="true"]::after {
  content: "";
  position: absolute;
  height: 2px;
  left: 0;
  right: 0;
  bottom: -1px;
  background: var(--action);
}
.result-content {
  min-width: 0;
  flex: 1;
  padding: 16px 21px;
}
.address-summary {
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
}
.address-pin {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  color: var(--action);
  background: var(--blue-200);
}
.address-pin .icon {
  width: 23px;
  height: 23px;
}
.postal-text,
.identity-summary {
  min-width: 0;
  overflow-wrap: anywhere;
}
#summary-street,
#summary-name {
  color: var(--text);
  font: 500 clamp(15px, 1.45vw, 20px)/1.4 var(--mono);
}
#summary-location {
  font: 500 12px/1.5 var(--mono);
  color: var(--slate-650);
  margin-top: 2px;
}
.identity-name {
  display: flex;
  align-items: center;
  gap: 5px;
}
.identity-name .icon-button,
.address-fields dd .icon-button {
  flex: none;
}
#summary-demographics {
  font-size: 12px;
  line-height: 1.5;
  color: var(--slate-650);
}
.tax-badge {
  margin-left: auto;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 5px 9px;
  background: var(--positive-bg);
  color: var(--positive-text);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.tax-badge i {
  background: var(--positive-text);
  width: 6px;
  height: 6px;
}
.tax-badge[data-tax="applies"] {
  color: var(--slate-650);
  background: var(--surface-panel);
}
.tax-badge[data-tax="applies"] i {
  background: var(--slate-500);
}

.address-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 21px;
  margin-top: 8px;
}
.address-fields > div {
  display: grid;
  grid-template-columns: minmax(64px, 23%) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 53px;
}
.identity-section {
  margin-top: 14px;
}
.identity-section + .identity-section {
  border-top: 1px solid var(--border);
  padding-top: 13px;
  margin-top: 10px;
}
.identity-section h3 {
  font-size: 13px;
  font-weight: 740;
}
.identity-section .address-fields {
  margin-top: 4px;
}
.identity-section .address-fields > div {
  min-height: 39px;
}
.account-section h3 {
  font-size: 13px;
  font-weight: 730;
}
.account-section + .account-section {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.account-heading,
.account-heading a {
  display: flex;
  align-items: center;
  gap: 5px;
}
.account-heading {
  justify-content: space-between;
}
.account-heading a {
  font-size: 12px;
}
.account-heading a:hover {
  text-decoration: underline;
}
.account-heading .icon {
  width: 14px;
  height: 14px;
}
.address-fields > div:nth-last-child(n + 3) {
  border-bottom: 1px solid var(--border);
}
.address-fields dt {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 570;
}
.address-fields dd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  color: var(--text);
  overflow-wrap: anywhere;
  font: 500 12px/1.5 var(--mono);
}
.address-fields dd [lang="zh-CN"] {
  font-family: var(--sans);
}
.icon-button {
  width: 27px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--text-muted);
  padding: 0;
}
.icon-button .icon {
  width: 15px;
  height: 15px;
}
.icon-button:hover {
  background: var(--surface-selected);
  color: var(--action);
}
.icon-button:disabled {
  opacity: 0.45;
}

.result-footer {
  border-top: 1px solid var(--border);
  min-height: 47px;
  padding: 6px 21px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 7px;
}
.use-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.use-note .icon {
  width: 15px;
  height: 15px;
}
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--slate-650);
  font: 500 11px/1 var(--mono);
}
.pagination .icon-button {
  border-color: var(--border);
  width: 24px;
  height: 24px;
}
#code-preview {
  width: 100%;
  height: clamp(235px, 37vh, 350px);
  margin: 0;
  overflow: auto;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle);
  font: 500 12px/1.65 var(--mono);
}

.tax-guide {
  margin-top: 43px;
}
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 17px;
}
.section-heading h2,
.faq h2 {
  font-size: 24px;
  font-weight: 760;
  line-height: 1.35;
  letter-spacing: -0.025em;
}
.section-heading p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 8px;
  font-size: 13px;
}
.source-link {
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.tax-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 0;
  border-block: 1px solid var(--border);
}
.tax-list li {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 17px 15px 16px;
  gap: 12px;
  border-inline-start: 1px solid var(--border);
}
.tax-list li:first-child {
  border-inline-start: 0;
  padding-inline-start: 0;
}
.tax-list li:last-child {
  padding-inline-end: 0;
}
.state-title {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.state-title h3 {
  font-size: 13px;
  font-weight: 730;
}
.state-title [lang="en"] {
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-muted);
}
.state-code {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  background: var(--surface-selected);
  color: var(--action-hover);
  border: 1px solid var(--blue-200);
  border-radius: 6px;
  font: 500 13px/1 var(--mono);
}
.tax-list li > p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}
.state-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-self: start;
  min-height: 27px;
}
.state-action .icon {
  width: 13px;
  height: 13px;
}

.faq {
  margin-block: 48px 60px;
  display: grid;
  grid-template-columns: 1fr minmax(0, 2.55fr);
  gap: 24px;
  align-items: start;
}
.faq-list {
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
  padding: 1px 0;
}
.faq summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary .icon {
  color: var(--text-muted);
  transition: transform 0.15s;
}
.faq details[open] summary .icon {
  transform: rotate(180deg);
}
.faq details p {
  padding: 0 26px 16px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}
.site-footer {
  background: var(--surface-panel);
  border-top: 1px solid var(--border);
}
.footer-inner {
  min-height: 73px;
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}
.footer-brand {
  color: var(--text);
  font-weight: 720;
}
.back-top {
  white-space: nowrap;
}
.back-top .icon {
  width: 14px;
  height: 14px;
}

.feedback {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 5;
  max-width: calc(100vw - 40px);
  padding: 10px 15px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--white);
  box-shadow: 0 4px 16px #1f385323;
  font-size: 13px;
}
.feedback:empty {
  opacity: 0;
  pointer-events: none;
  padding: 0;
  border: 0;
}

@media (max-width: 980px) {
  .layout {
    width: calc(100% - 48px);
  }
  .workbench {
    grid-template-columns: minmax(254px, 31%) minmax(0, 1fr);
  }
  .panel-heading,
  .result-toolbar,
  .result-footer {
    padding-inline: 15px;
  }
  #filters,
  .result-content {
    padding-inline: 15px;
  }
  .address-fields {
    column-gap: 12px;
  }
  .address-fields > div {
    grid-template-columns: minmax(45px, 20%) minmax(0, 1fr);
    gap: 5px;
  }
  .address-fields > div:nth-child(1) dt,
  .address-fields > div:nth-child(6) dt {
    font-size: 11px;
  }
  .tax-list li {
    padding-inline: 9px;
  }
}

@media (max-width: 740px) {
  .topbar {
    height: auto;
  }
  .topbar-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 54px 34px;
    gap: 0 12px;
  }
  .topbar .market-picker {
    grid-column: 2;
    grid-row: 1;
  }
  .layout {
    width: calc(100% - 32px);
  }
  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 19px;
    font-size: 12px;
  }
  .nav a {
    padding-inline: 1px;
  }
  .nav a[aria-current]::after {
    inset-inline: 1px;
  }
  .brand {
    font-size: 16px;
    gap: 7px;
    letter-spacing: 0;
  }
  .brand-icon {
    width: 30px;
    height: 30px;
  }
  .brand-icon .icon {
    width: 20px;
    height: 20px;
  }
  .hero-inner {
    min-height: auto;
    display: block;
    padding-block: 24px 21px;
  }
  .hero h1 {
    font-size: clamp(30px, 7.9vw, 45px);
  }
  .hero-copy > p {
    font-size: 13px;
    margin-top: 9px;
    line-height: 1.65;
  }
  .hero-meta {
    margin-top: 10px;
    font-size: 11px;
  }
  .map,
  .domestic-preview {
    display: none;
  }
  .workbench {
    display: block;
    margin-top: 16px;
  }
  .controls {
    border-inline-end: 0;
    border-end-start-radius: 0;
    border-start-end-radius: inherit;
    border-bottom: 1px solid var(--border);
  }
  .panel-heading {
    min-height: 58px;
    gap: 8px;
  }
  .result-heading h2 {
    font-size: 16px;
  }
  .result-heading .panel-icon {
    width: 28px;
    height: 28px;
  }
  .result-actions {
    gap: 5px;
  }
  .result-actions .button {
    padding-inline: 7px;
    gap: 4px;
  }
  .result-actions .icon {
    width: 14px;
    height: 14px;
  }
  .sample-label {
    padding-inline: 5px;
    font-size: 10px;
  }
  .result-tabs {
    min-height: 43px;
    gap: clamp(10px, 3.6vw, 20px);
  }
  .tax-guide {
    margin-top: 36px;
  }
  .tax-list {
    grid-template-columns: 1fr;
  }
  .tax-list li,
  .tax-list li:first-child,
  .tax-list li:last-child {
    grid-template-columns: minmax(116px, 1fr) 1.1fr auto;
    grid-template-rows: auto;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    border-inline-start: 0;
  }
  .tax-list li + li {
    border-top: 1px solid var(--border);
  }
  .tax-list li > p {
    font-size: 11px;
  }
  .state-title h3 {
    font-size: 12px;
  }
  .state-title {
    gap: 7px;
  }
  .state-code {
    width: 29px;
    height: 28px;
    font-size: 12px;
  }
  .state-action {
    white-space: nowrap;
    font-size: 11px;
  }
  .section-heading {
    align-items: start;
  }
  .section-heading h2,
  .faq h2 {
    font-size: 22px;
  }
  .section-heading p {
    font-size: 12px;
  }
  .source-link {
    font-size: 11px;
    padding-top: 7px;
  }
  .faq {
    display: block;
    margin-block: 35px 43px;
  }
  .faq h2 {
    margin-bottom: 12px;
  }
}

@media (max-width: 435px) {
  #filters {
    gap: 11px;
  }
  #filters .input-group input,
  #filters .input-group select {
    height: 38px;
  }
  #filters .select-wrap .icon {
    top: 11px;
  }
  .address-summary {
    flex-wrap: wrap;
    gap: 8px;
    padding: 11px;
  }
  .address-pin {
    width: 30px;
    height: 30px;
  }
  .address-pin .icon {
    width: 18px;
    height: 18px;
  }
  .tax-badge {
    margin-left: 38px;
    font-size: 10px;
    padding: 3px 7px;
  }
  .address-fields {
    grid-template-columns: 1fr;
  }
  .address-fields > div {
    min-height: 43px;
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .address-fields > div:nth-last-child(n + 2) {
    border-bottom: 1px solid var(--border);
  }
  #identity-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 15px;
  }
  #identity-fields > div {
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 0;
    padding-block: 5px;
  }
  #identity-fields > div:nth-last-child(n + 2) {
    border-bottom: 0;
  }
  #identity-fields > div:nth-child(n + 3) {
    border-top: 1px solid var(--border);
  }
  #identity-fields dd .icon-button {
    height: 25px;
  }
  .footer-inner {
    flex-wrap: wrap;
    justify-content: start;
    gap: 8px 14px;
    padding-block: 12px;
  }
  .back-top {
    margin-left: auto;
  }
}

@media (max-width: 355px) {
  .result-heading .panel-icon {
    display: none;
  }
  .hero-meta {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
