:root {
  color-scheme: light;
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f0f5f7;
  --text: #172126;
  --muted: #5d6972;
  --line: #d9e1e7;
  --brand: #0b7a75;
  --brand-dark: #075f5a;
  --accent: #c77d2a;
  --danger: #b94141;
  --ok: #237a4f;
  --shadow: 0 20px 60px rgba(20, 39, 48, .09);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 225, 231, .82);
  background: rgba(246, 248, 251, .92);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: white;
  font-weight: 900;
}

.brand small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.1;
  font-weight: 600;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 9px 12px;
  color: var(--muted);
  font-size: 14px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a:focus {
  color: var(--text);
  background: #e9eff2;
  outline: none;
}

.container {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
}

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

.hero {
  padding: 44px 0 24px;
}

.search-hero {
  position: relative;
  overflow: hidden;
  min-height: auto;
  padding: 42px 0 28px;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 35% 78%, rgba(60, 134, 178, .12) 0 27%, transparent 28%),
    radial-gradient(circle at 58% 78%, rgba(79, 154, 199, .10) 0 33%, transparent 34%),
    linear-gradient(95deg, #ddf7f1 0%, #f8fbf2 58%, #fffaf1 100%);
  border-bottom: 1px solid #b8ded5;
}

.search-hero-inner {
  text-align: center;
}

.search-hero .eyebrow {
  color: #087767;
  font-size: 12px;
  letter-spacing: .12em;
}

.search-hero h1 {
  margin: 8px auto 0;
  font-size: clamp(40px, 5.2vw, 62px);
  line-height: 1.02;
  max-width: 980px;
}

.search-hero .lead {
  margin: 14px auto 0;
  max-width: 800px;
  color: #536963;
  font-size: clamp(15px, 1.25vw, 18px);
  font-weight: 600;
}

.hero-search-panel {
  width: min(860px, 100%);
  margin: 22px auto 0;
  padding: 8px;
  border: 1px solid #b5dcd4;
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 16px 44px rgba(40, 87, 96, .13);
}

.hero-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 8px;
}

.hero-address-input {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b5d9d1;
  border-radius: 10px;
  padding: 0 15px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
}

.hero-address-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 5px rgba(11, 122, 117, .12);
  outline: none;
}

.hero-search-button {
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #37a68f, #3d82b4);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.hero-search-button:hover,
.hero-search-button:focus {
  filter: brightness(.95);
  outline: none;
}

.quick-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.quick-link {
  min-height: 32px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(11, 122, 117, .22);
  background: rgba(255, 255, 255, .7);
  color: #28564f;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.quick-link:hover,
.quick-link:focus {
  background: #fff;
  outline: none;
}

.hero-query-result {
  width: min(900px, 100%);
  margin: 16px auto 0;
  text-align: left;
}

.hero-trust-row {
  margin: 22px auto 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr);
  gap: 28px;
  align-items: stretch;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 62px);
  max-width: 880px;
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(26px, 3vw, 38px);
}

h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.lead {
  margin: 18px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.trust-row {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-width: 720px;
}

.trust-chip {
  min-height: 62px;
  padding: 11px 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.trust-chip strong {
  display: block;
  font-size: 15px;
}

.trust-chip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.query-panel,
.side-panel,
.content-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.query-panel {
  padding: 18px;
}

.query-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.combined-query-title {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--text);
  color: #fff;
  font-weight: 900;
}

.tab-btn {
  min-height: 42px;
  border: 1px solid var(--line);
  background: #f7fafb;
  color: var(--muted);
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn[aria-selected="true"] {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.query-form {
  display: grid;
  gap: 12px;
}

.input-wrap label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
}

.address-input {
  width: 100%;
  min-height: 54px;
  border: 1px solid #c9d4dc;
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: white;
  font: inherit;
  font-size: 16px;
}

.address-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 122, 117, .12);
  outline: none;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

select,
.amount-input {
  min-height: 44px;
  width: 100%;
  border: 1px solid #c9d4dc;
  border-radius: 8px;
  background: white;
  color: var(--text);
  font: inherit;
  padding: 0 12px;
}

.primary-btn,
.secondary-btn {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.primary-btn {
  background: var(--brand);
  color: #fff;
}

.primary-btn:hover,
.primary-btn:focus {
  background: var(--brand-dark);
  outline: none;
}

.secondary-btn {
  background: #eef4f5;
  color: var(--text);
  border-color: var(--line);
}

.secondary-btn:hover,
.secondary-btn:focus {
  background: #e2ecee;
  outline: none;
}

.helper-text {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.query-result {
  display: none;
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.query-result.is-visible {
  display: block;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e5f5ee;
  color: var(--ok);
  font-weight: 800;
  font-size: 12px;
}

.status.warn {
  background: #fff0e1;
  color: #986016;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.metric {
  padding: 12px;
  background: #f7fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 2px;
  font-size: 20px;
}

.tx-list {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.tx-list li {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 13px;
}

.tx-list strong {
  color: var(--text);
}

.section {
  padding: 42px 0;
}

.section.compact {
  padding-top: 26px;
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-head p,
.content-panel p,
.card p,
.step p,
.faq p {
  color: var(--muted);
  margin: 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.card,
.step,
.faq,
.mini-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
}

.card a {
  display: inline-flex;
  margin-top: 14px;
  color: var(--brand-dark);
  font-weight: 800;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.step-num {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
  margin-bottom: 12px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  gap: 20px;
  align-items: start;
}

.side-panel {
  padding: 20px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mini-stat strong {
  display: block;
  font-size: 22px;
}

.mini-stat span {
  color: var(--muted);
  font-size: 13px;
}

.content-panel {
  padding: 22px;
}

.content-panel ul {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.notice {
  margin-top: 14px;
  padding: 12px;
  border-radius: 8px;
  background: #fff8ed;
  border: 1px solid #f0d8b6;
  color: #76511f;
  font-size: 13px;
}

.page-hero {
  padding: 44px 0 24px;
}

.page-hero h1 {
  font-size: clamp(34px, 4.3vw, 54px);
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 14px;
}

.breadcrumb a {
  color: var(--brand-dark);
  font-weight: 700;
}

.article {
  max-width: 880px;
}

.article h2 {
  margin-top: 34px;
}

.article p,
.article li {
  color: var(--muted);
}

.transfer-page {
  background: #fffdf8;
}

.transfer-hero {
  padding: 34px 0 18px;
}

.transfer-hero h1 {
  font-size: clamp(34px, 4vw, 52px);
}

.transfer-workbench {
  padding-bottom: 54px;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr 1.15fr .75fr;
  gap: 14px;
  align-items: end;
}

.filter-grid label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.filter-input {
  width: 100%;
  min-height: 56px;
  border: 1px solid #c8d2df;
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: #18212a;
  font: inherit;
  font-size: 18px;
}

.filter-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(11, 122, 117, .12);
  outline: none;
}

.range-row {
  margin: 16px 0 22px;
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 12px;
}

.range-btn {
  min-height: 54px;
  border: 1px solid #c8d2df;
  border-radius: 999px;
  background: #fff;
  color: #29465b;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.range-btn:hover,
.range-btn:focus,
.range-btn.is-active {
  border-color: var(--brand);
  background: #e8f5f2;
  color: var(--brand-dark);
  outline: none;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.summary-card {
  min-height: 126px;
  border: 1px solid #dde5ee;
  background: #f8fafc;
  border-radius: 8px;
  padding: 20px;
}

.summary-card span,
.summary-card small {
  display: block;
  color: var(--muted);
  font-weight: 800;
}

.summary-card strong {
  display: block;
  margin: 8px 0 10px;
  font-size: 30px;
}

.table-shell {
  overflow-x: auto;
  border-top: 1px solid #e5dece;
}

.transfer-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fffdf8;
}

.transfer-table th,
.transfer-table td {
  padding: 18px 16px;
  border-bottom: 1px solid #e5dece;
  text-align: left;
  vertical-align: middle;
}

.transfer-table th {
  color: var(--muted);
  font-size: 18px;
}

.transfer-table td {
  font-size: 18px;
}

.direction-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 12px;
  border-radius: 999px;
  background: #d8f4df;
  color: #07823d;
  font-weight: 900;
  border: 1px solid #a8dfb9;
}

.direction-pill.out {
  background: #ffe1e1;
  color: #b82f2f;
  border-color: #efb3b3;
}

.token-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.token-cell small {
  display: block;
  color: var(--muted);
}

.token-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e1f5f1;
  color: #21a084;
  border: 1px solid #c6e8e2;
  font-weight: 900;
  font-size: 14px;
}

.amount-in {
  color: #2ead68;
}

.amount-out {
  color: #e34b4b;
}

@media (max-width: 900px) {
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }

  .cards,
  .steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nav {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
  }

  .filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .range-row,
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .search-hero {
    min-height: auto;
    padding: 30px 0 24px;
  }

  .search-hero h1 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .search-hero .lead {
    margin-top: 14px;
    font-size: 17px;
  }

  .hero-search-panel {
    margin-top: 18px;
    padding: 8px;
    border-radius: 18px;
  }

  .hero-search-form {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .hero-address-input,
  .hero-search-button {
    min-height: 46px;
    border-radius: 10px;
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .container,
  .nav {
    width: min(100% - 22px, 1160px);
  }

  .hero {
    padding-top: 34px;
  }

  .trust-row,
  .cards,
  .steps,
  .faq-grid,
  .result-grid,
  .form-row,
  .mini-stats {
    grid-template-columns: 1fr;
  }

  .query-tabs {
    grid-template-columns: 1fr;
  }

  .tx-list li {
    grid-template-columns: 1fr;
    gap: 2px;
  }

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

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

  .transfer-table th,
  .transfer-table td {
    padding: 14px 12px;
    font-size: 15px;
  }

  .search-hero {
    padding: 24px 0 22px;
  }

  .search-hero .eyebrow {
    font-size: 12px;
  }

  .search-hero .lead {
    font-size: 15px;
    font-weight: 650;
  }

  .hero-search-panel {
    margin-top: 18px;
  }

  .hero-address-input {
    padding: 0 16px;
  }

  .quick-actions {
    justify-content: flex-start;
  }
}
