:root {
  color-scheme: dark;
  --bg: #07100e;
  --surface: #0b1714;
  --surface-raised: #0e1d19;
  --surface-soft: #10241f;
  --text: #f2fbf7;
  --muted: #9eb5ad;
  --muted-strong: #c2d3cd;
  --line: rgba(107, 218, 187, 0.2);
  --line-strong: rgba(107, 218, 187, 0.42);
  --accent: #42e8bc;
  --accent-strong: #18cda0;
  --danger: #ee7468;
  --warning: #f0bd69;
  --success: #68dba9;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 16% 0%, rgba(66, 232, 188, 0.1), transparent 28rem),
    radial-gradient(circle at 92% 12%, rgba(238, 116, 104, 0.07), transparent 24rem),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(66, 232, 188, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(66, 232, 188, 0.5) 1px, transparent 1px);
  background-size: 80px 80px;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

button,
input,
select {
  font: inherit;
}

button,
.button {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 0 1rem;
  color: var(--text);
  background: rgba(66, 232, 188, 0.06);
  font-weight: 760;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

button:hover,
.button:hover {
  border-color: var(--accent);
  background: rgba(66, 232, 188, 0.12);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(66, 232, 188, 0.34);
  outline-offset: 2px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary {
  color: #032019;
  border-color: var(--accent);
  background: var(--accent);
}

.primary:hover {
  color: #021511;
  background: #65f3cc;
}

.secondary {
  background: transparent;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  min-height: 72px;
  padding: 10px max(18px, calc((100vw - 1380px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 14, 0.9);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #032019;
  background: var(--accent);
  font-size: 1.15rem;
  font-weight: 950;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1.02rem;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
}

.topbar > nav,
.footer nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.topbar > nav a,
.footer nav a {
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 680;
  text-decoration: none;
}

.topbar > nav a:hover,
.footer nav a:hover {
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.network-pill,
.verified-badge,
.noncustodial-badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted-strong);
  background: rgba(66, 232, 188, 0.05);
  font-size: 0.75rem;
  font-weight: 780;
  white-space: nowrap;
}

.network-pill i,
.dataset-health i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 12px rgba(240, 189, 105, 0.6);
}

.wallet-button {
  min-width: 142px;
}

.shell {
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
  align-items: stretch;
  gap: 18px;
}

.hero-copy,
.testnet-notice,
.market-card,
  .stats article,
  .ownership-ledger,
  .transaction-card,
.context-card,
.catalog-card,
.learn {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(14, 29, 25, 0.96), rgba(9, 20, 17, 0.96));
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: clamp(32px, 5vw, 68px);
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 870px;
  font-size: clamp(3rem, 6.4vw, 6rem);
  line-height: 0.98;
}

h2 {
  font-size: clamp(1.9rem, 3vw, 3.2rem);
  line-height: 1.04;
}

h3 {
  font-size: 1.15rem;
  line-height: 1.2;
}

.lede,
.section-copy {
  color: var(--muted);
  line-height: 1.65;
}

.lede {
  max-width: 780px;
  margin: 1.5rem 0 0;
  font-size: clamp(1.02rem, 1.6vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.testnet-notice {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 28px;
  border-color: rgba(238, 116, 104, 0.45);
  background:
    linear-gradient(145deg, rgba(57, 29, 26, 0.72), rgba(14, 28, 24, 0.96));
}

.notice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(238, 116, 104, 0.6);
  border-radius: 50%;
  color: #190805;
  background: var(--danger);
  font-weight: 950;
}

.testnet-notice h2 {
  font-size: clamp(1.5rem, 2.2vw, 2.25rem);
}

.testnet-notice p:not(.eyebrow) {
  margin: 1rem 0;
  color: #e8c8c4;
  line-height: 1.55;
}

.market-card,
.catalog-card,
.learn {
  margin-top: 18px;
  padding: clamp(22px, 3.5vw, 40px);
}

.section-heading,
.transaction-heading,
.context-heading,
.market-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.section-copy {
  max-width: 760px;
  margin: 0.65rem 0 0;
}

.market-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.verified-badge,
.status-chip.approved,
.status-chip.indexed {
  color: #bff8e4;
  border-color: rgba(104, 219, 169, 0.36);
  background: rgba(104, 219, 169, 0.08);
}

.market-price {
  min-width: 220px;
  text-align: right;
}

.market-price span,
.market-price small,
.stats small,
.catalog-summary span {
  display: block;
  color: var(--muted);
}

.market-price span {
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.market-price strong {
  display: block;
  margin: 5px 0 2px;
  font-size: clamp(2rem, 3.5vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 28px 0 12px;
}

.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 12, 9, 0.52);
}

.segmented button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  font-size: 0.82rem;
}

.segmented button.active {
  color: #032019;
  background: var(--accent);
}

.segmented.compact {
  flex-shrink: 0;
}

.dataset-health {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.dataset-health span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dataset-health.ready i {
  background: var(--success);
  box-shadow: 0 0 12px rgba(104, 219, 169, 0.55);
}

.dataset-health.error i {
  background: var(--danger);
}

.price-chart {
  width: 100%;
  height: 380px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 13, 10, 0.72);
}

.chart-empty {
  display: grid;
  min-height: 180px;
  place-items: center;
  margin-top: -380px;
  padding: 30px;
  color: var(--muted);
  text-align: center;
  pointer-events: none;
}

.chart-empty[hidden] {
  display: none;
}

.chart-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
}

.chart-footer dl {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin: 0;
}

.chart-footer dl div {
  display: grid;
  gap: 3px;
}

.chart-footer dt {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chart-footer dd {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 760;
}

.chart-footer p {
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  text-align: right;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stats article {
  min-width: 0;
  padding: 20px;
  box-shadow: none;
}

.stat-label,
.label-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.stat-label {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 760;
}

.stats strong {
  display: block;
  margin: 18px 0 4px;
  overflow: hidden;
  font-size: clamp(1.45rem, 2.2vw, 2.25rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stats small {
  min-height: 1.2em;
  font-size: 0.76rem;
}

.ownership-ledger {
  overflow: hidden;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(8, 20, 17, 0.97);
  box-shadow: var(--shadow);
}

.ownership-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

.ownership-heading > div:first-child {
  padding: 28px 30px;
}

.ownership-heading h2 {
  font-size: clamp(1.75rem, 2.7vw, 2.8rem);
}

.ownership-index-state {
  display: grid;
  min-width: 270px;
  align-content: center;
  gap: 7px;
  padding: 24px 30px;
  border-left: 1px solid var(--line);
  background: rgba(2, 12, 9, 0.62);
}

.ownership-index-state span,
.ownership-summary dt {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ownership-index-state strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.ownership-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(66, 232, 188, 0.045), transparent 55%),
    rgba(3, 13, 10, 0.35);
}

.ownership-summary div {
  min-width: 0;
  padding: 18px 22px;
  border-right: 1px solid var(--line);
}

.ownership-summary div:last-child {
  border-right: 0;
}

.ownership-summary dd {
  margin: 8px 0 0;
  overflow: hidden;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1rem, 1.7vw, 1.35rem);
  font-variant-numeric: tabular-nums;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.ownership-table {
  min-width: 820px;
}

.ownership-table th,
.ownership-table td {
  padding: 14px 22px;
}

.ownership-table th {
  background: rgba(2, 12, 9, 0.82);
}

.ownership-table tbody tr {
  transition: background 140ms ease;
}

.ownership-table tbody tr:hover {
  background: rgba(66, 232, 188, 0.035);
}

.compact-label {
  display: none;
}

.ownership-rank {
  width: 72px;
  color: rgba(158, 181, 173, 0.64);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.ownership-address,
.ownership-activity a {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.77rem;
  font-variant-numeric: tabular-nums;
}

.ownership-balance {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-weight: 740;
}

.ownership-share {
  display: grid;
  grid-template-columns: 72px minmax(90px, 1fr);
  align-items: center;
  gap: 12px;
}

.ownership-share strong {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
}

.ownership-share i {
  position: relative;
  display: block;
  height: 3px;
  overflow: hidden;
  background: rgba(158, 181, 173, 0.16);
}

.ownership-share i::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: max(2px, var(--share));
  background: var(--accent);
  box-shadow: 0 0 12px rgba(66, 232, 188, 0.42);
}

.ownership-loading td {
  height: 84px;
  color: var(--muted);
  text-align: center;
}

.ownership-note {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(2, 12, 9, 0.62);
  font-size: 0.7rem;
  line-height: 1.45;
}

.ownership-note p {
  margin: 0;
}

.ownership-note > div {
  display: grid;
  flex-shrink: 0;
  gap: 4px;
  text-align: right;
}

.ownership-note a {
  font-weight: 720;
}

.tip {
  position: relative;
  display: inline-grid;
  min-width: 20px;
  min-height: 20px;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.7rem;
  line-height: 1;
}

.tip::after {
  content: attr(data-tooltip);
  position: absolute;
  right: -8px;
  bottom: calc(100% + 10px);
  z-index: 30;
  width: min(260px, 74vw);
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  background: #10211d;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
  font-size: 0.75rem;
  font-weight: 560;
  line-height: 1.4;
  text-align: left;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tip:hover::after,
.tip:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(300px, 0.42fr);
  align-items: start;
  gap: 14px;
}

.transaction-card {
  overflow: hidden;
  border-radius: 5px;
  background: rgba(8, 20, 17, 0.97);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.transaction-heading {
  align-items: center;
  padding: 28px 30px 24px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(66, 232, 188, 0.055), transparent 50%),
    rgba(4, 15, 12, 0.72);
}

.transaction-heading h2 {
  max-width: 620px;
  font-size: clamp(1.75rem, 2.5vw, 2.65rem);
}

.transaction-subtitle {
  max-width: 640px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.transaction-meta {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0;
  margin: 0;
  border: 1px solid var(--line);
}

.transaction-meta div {
  min-width: 78px;
  padding: 9px 12px;
  border-left: 1px solid var(--line);
}

.transaction-meta div:first-child {
  border-left: 0;
}

.transaction-meta dt {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.transaction-meta dd {
  margin: 4px 0 0;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.tabs {
  display: flex;
  gap: 30px;
  margin: 0;
  padding: 0 30px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: rgba(2, 12, 9, 0.78);
}

.tabs button {
  position: relative;
  min-height: 52px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
}

.tabs button span {
  margin-right: 8px;
  color: rgba(158, 181, 173, 0.62);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.65rem;
}

.tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}

.tabs button.active {
  color: var(--text);
  background: transparent;
  box-shadow: none;
}

.tabs button.active span {
  color: var(--accent);
}

.tabs button.active::after {
  background: var(--accent);
}

form {
  display: grid;
  gap: 17px;
  margin-top: 22px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted-strong);
  font-size: 0.83rem;
  font-weight: 720;
}

.balance-note {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 560;
}

.balance-note.insufficient {
  color: #ffc0ba;
}

.ticket-form {
  display: block;
  margin: 0;
}

.ticket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(290px, 0.88fr);
  min-height: 610px;
}

.ticket-entry {
  min-width: 0;
  padding: 28px 30px 32px;
  border-right: 1px solid var(--line);
}

.entry-section-heading,
.asset-leg-heading,
.ticket-setting,
.setting-label,
.route-strip,
.order-review header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.entry-section-heading {
  min-height: 36px;
  margin-bottom: 18px;
}

.entry-section-heading > div,
.setting-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.entry-section-heading strong,
.setting-label strong {
  color: var(--text);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.section-index {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
}

.route-select {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  font-size: 0.66rem;
  text-transform: uppercase;
}

.route-select select {
  width: auto;
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 26px 0 6px;
  color: var(--text);
  background-color: transparent;
  font-size: 0.72rem;
  font-weight: 780;
}

.asset-flow {
  position: relative;
}

.asset-leg {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  background: rgba(2, 12, 9, 0.62);
  transition: border-color 140ms ease, background 140ms ease;
}

.asset-leg-input:focus-within {
  border-color: var(--accent);
  background: rgba(7, 28, 22, 0.82);
  box-shadow: inset 3px 0 0 var(--accent);
}

.asset-leg-output {
  border-color: rgba(107, 218, 187, 0.22);
  background: rgba(66, 232, 188, 0.035);
}

.asset-leg-heading {
  padding: 11px 14px 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.asset-leg-heading small {
  overflow: hidden;
  max-width: 60%;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 600;
  letter-spacing: 0;
  text-align: right;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.asset-value-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 165px;
  align-items: stretch;
  min-height: 86px;
}

.asset-value-row input,
.asset-value-row output {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 86px;
  border: 0;
  border-radius: 0;
  padding: 4px 16px 12px;
  color: var(--text);
  background: transparent;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  letter-spacing: -0.045em;
}

.asset-value-row input:focus-visible {
  outline: 0;
}

.asset-value-row input::placeholder {
  color: rgba(158, 181, 173, 0.35);
}

.asset-identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border-left: 1px solid var(--line);
  background: rgba(4, 17, 13, 0.72);
}

.asset-glyph {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(66, 232, 188, 0.7);
  border-radius: 3px;
  color: #022219;
  background: var(--accent);
  font-size: 0.8rem;
  font-weight: 900;
}

.asset-glyph.catbot {
  color: #ffe1dd;
  border-color: rgba(238, 116, 104, 0.75);
  background: rgba(238, 116, 104, 0.22);
}

.asset-glyph.lp {
  color: #0b1c17;
  background: #bdeedd;
  font-size: 0.62rem;
}

.asset-identity strong,
.asset-identity small {
  display: block;
}

.asset-identity strong {
  color: var(--text);
  font-size: 0.82rem;
}

.asset-identity small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 550;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-switch,
.flow-join {
  position: relative;
  z-index: 2;
  display: grid;
  width: 36px;
  height: 36px;
  min-height: 36px;
  margin: -9px auto;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  padding: 0;
  color: var(--accent);
  background: #071713;
  box-shadow: 0 0 0 5px #091613;
}

.flow-switch:hover {
  transform: rotate(180deg);
}

.flow-join span {
  margin-top: -2px;
  font-size: 1.1rem;
}

.route-strip {
  margin-top: 18px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.69rem;
}

.route-strip strong {
  color: var(--muted-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 650;
}

.route-strip i {
  margin: 0 5px;
  color: var(--accent);
  font-style: normal;
}

.ticket-explainer {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.55;
}

.ticket-setting {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.setting-label {
  min-width: 0;
}

.setting-label > span:not(.section-index) {
  display: grid;
  gap: 3px;
}

.setting-label small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 550;
}

.precision-setting {
  display: flex;
  align-items: stretch;
  gap: 7px;
}

.precision-input {
  display: grid;
  grid-template-columns: 46px 22px;
  align-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(2, 12, 9, 0.62);
}

.precision-input input {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 0 0 0 10px;
  background: transparent;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.75rem;
}

.precision-input span {
  color: var(--muted);
  font-size: 0.7rem;
}

.precision-setting .segmented {
  border-radius: 0;
  padding: 0;
}

.precision-setting .segmented button {
  min-height: 36px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 0 9px;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
}

.precision-setting .segmented button:first-child {
  border-left: 0;
}

.order-review {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 28px 26px 26px;
  background:
    linear-gradient(180deg, rgba(66, 232, 188, 0.035), transparent 28%),
    rgba(3, 13, 10, 0.78);
}

.order-review header {
  align-items: flex-start;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.order-review h3 {
  font-size: 1.05rem;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  text-transform: uppercase;
}

.live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 9px rgba(104, 219, 169, 0.7);
}

.review-hero {
  margin-top: 22px;
  padding: 4px 0 18px 16px;
  border-left: 3px solid var(--accent);
}

.review-hero span,
.review-hero small {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
}

.review-hero strong {
  display: block;
  margin: 8px 0 5px;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.quote-ledger {
  display: grid;
  margin: 0 0 20px;
  border-top: 1px solid var(--line);
}

.quote-ledger div {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.quote-ledger dt {
  color: var(--muted);
  font-size: 0.67rem;
}

.quote-ledger dd {
  margin: 0;
  color: var(--muted-strong);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
  text-align: right;
  overflow-wrap: anywhere;
}

.order-review .risk-ack {
  margin-top: auto;
}

.signing-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.45;
}

.signing-note span {
  margin-right: 6px;
  color: var(--accent);
}

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

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(2, 12, 9, 0.62);
  outline: none;
}

input:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.input-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(2, 12, 9, 0.62);
}

.input-shell:focus-within {
  outline: 3px solid rgba(66, 232, 188, 0.34);
  outline-offset: 2px;
}

.input-shell input {
  min-width: 0;
  border: 0;
  background: transparent;
}

.input-shell input:focus-visible {
  outline: 0;
}

.input-shell > span {
  padding: 0 13px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 820;
}

.slippage-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto;
  gap: 10px;
}

.field-help {
  margin: -4px 0 0;
  padding: 12px 14px;
  border-left: 2px solid var(--accent);
  color: var(--muted);
  background: rgba(66, 232, 188, 0.045);
  font-size: 0.8rem;
  line-height: 1.5;
}

.quote {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--line);
}

.quote > div {
  min-width: 0;
  padding: 15px;
  background: rgba(7, 18, 15, 0.95);
}

.quote span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.quote strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.35;
}

.risk-ack {
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 11px;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid rgba(238, 116, 104, 0.34);
  border-radius: 0;
  color: #e8c8c4;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 620;
  line-height: 1.45;
}

.risk-ack input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--danger);
}

.action-button {
  min-height: 48px;
  margin-top: 14px;
  border-radius: 3px;
  font-size: 0.78rem;
  letter-spacing: 0.01em;
}

.context-column {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: rgba(8, 20, 17, 0.96);
  box-shadow: var(--shadow);
}

.context-card {
  padding: 23px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.context-card:last-child {
  border-bottom: 0;
}

.context-heading h3 {
  max-width: 250px;
}

.status {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.55;
}

.status.error {
  color: #ffc9c3;
}

.contract-list {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
}

.wallet-balances {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 18px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.wallet-balances div {
  min-width: 0;
  padding: 11px 9px;
  border-right: 1px solid var(--line);
  background: transparent;
}

.wallet-balances div:last-child {
  border-right: 0;
}

.wallet-balances dt {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 760;
}

.wallet-balances dd {
  margin: 7px 0 0;
  overflow: hidden;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contract-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.contract-list dt {
  color: var(--muted);
  font-size: 0.76rem;
}

.contract-list dd {
  margin: 0;
  font-size: 0.8rem;
  text-align: right;
}

.safety-compact ol {
  display: grid;
  gap: 9px;
  margin: 15px 0 18px;
  padding-left: 1.25rem;
  color: var(--muted-strong);
  font-size: 0.84rem;
  line-height: 1.45;
}

.catalog-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 26px 0 18px;
}

.catalog-summary div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 13, 10, 0.46);
}

.catalog-summary span {
  font-size: 0.72rem;
}

.catalog-summary strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  text-align: left;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

tr:last-child td {
  border-bottom: 0;
}

th {
  color: var(--muted);
  background: rgba(3, 13, 10, 0.68);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td {
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.status-chip.deprecated {
  color: #f4cdca;
  border-color: rgba(238, 116, 104, 0.36);
  background: rgba(238, 116, 104, 0.07);
}

.catalog-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.learn-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
}

.learn-grid article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(3, 13, 10, 0.46);
}

.step {
  color: var(--accent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
}

.learn-grid h3 {
  margin-top: 24px;
}

.learn-grid p {
  min-height: 6.2em;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.learn-grid a {
  font-size: 0.8rem;
  font-weight: 720;
}

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1380px, calc(100% - 36px));
  margin: 0 auto;
  padding: 24px 0 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
}

.footer p {
  margin: 0;
}

.guide-hero {
  padding: clamp(32px, 6vw, 76px);
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(14, 29, 25, 0.96), rgba(9, 20, 17, 0.96));
}

.guide-hero h1 {
  max-width: 1000px;
}

.guide-warning {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  padding: 14px 18px;
  border: 1px solid rgba(238, 116, 104, 0.45);
  border-radius: 12px;
  color: #e8c8c4;
  background: rgba(238, 116, 104, 0.07);
  font-size: 0.84rem;
}

.guide-warning strong {
  color: #ffd9d5;
}

.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.guide-index {
  position: sticky;
  top: 90px;
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(10, 23, 19, 0.94);
}

.guide-index strong {
  margin-bottom: 8px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-index a {
  padding: 7px 8px;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.78rem;
  text-decoration: none;
}

.guide-index a:hover {
  color: var(--text);
  background: rgba(66, 232, 188, 0.08);
}

.guide-content {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(14, 29, 25, 0.96), rgba(9, 20, 17, 0.96));
}

.guide-content section {
  padding: clamp(26px, 4.5vw, 52px);
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 88px;
}

.guide-content section:last-child {
  border-bottom: 0;
}

.guide-content section > p:not(.eyebrow) {
  max-width: 880px;
  color: var(--muted-strong);
  line-height: 1.7;
}

.procedure,
.check-list {
  display: grid;
  gap: 12px;
  max-width: 900px;
  padding-left: 1.4rem;
  color: var(--muted-strong);
  line-height: 1.6;
}

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

.definition-grid div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(3, 13, 10, 0.42);
}

.definition-grid dt {
  color: var(--text);
  font-weight: 780;
}

.definition-grid dd {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.callout {
  max-width: 900px;
  margin-top: 22px;
  padding: 16px 18px;
  border-left: 3px solid var(--accent);
  color: var(--muted-strong);
  background: rgba(66, 232, 188, 0.055);
  line-height: 1.6;
}

.guide-content details {
  max-width: 900px;
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.guide-content summary {
  color: var(--text);
  font-weight: 720;
  cursor: pointer;
}

.guide-content details p {
  color: var(--muted);
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1040px) {
  .topbar {
    grid-template-columns: auto 1fr;
  }

  .topbar > nav {
    display: none;
  }

  .topbar-actions {
    justify-self: end;
  }

  .hero,
  .workspace,
  .ownership-heading,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .ownership-index-state {
    min-width: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

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

  .ownership-summary div:nth-child(2) {
    border-right: 0;
  }

  .ownership-summary div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .guide-index {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

@media (max-width: 880px) {
  .ticket-layout {
    grid-template-columns: 1fr;
  }

  .ticket-entry {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .order-review .risk-ack {
    margin-top: 8px;
  }
}

@media (max-width: 700px) {
  .topbar {
    min-height: 64px;
    gap: 10px;
    padding: 8px 12px;
  }

  .brand small,
  .network-pill {
    display: none;
  }

  .wallet-button {
    min-width: 0;
    min-height: 40px;
    padding: 0 11px;
    font-size: 0.8rem;
  }

  .shell {
    width: min(100% - 22px, 1380px);
    padding-top: 12px;
  }

  .hero-copy,
  .testnet-notice,
    .market-card,
    .ownership-ledger,
    .transaction-card,
  .catalog-card,
  .learn {
    border-radius: 16px;
  }

  .hero-copy {
    padding: 30px 22px;
  }

  h1 {
    font-size: clamp(2.7rem, 13vw, 4rem);
  }

  .testnet-notice {
    grid-template-columns: 34px 1fr;
    padding: 22px;
  }

  .notice-icon {
    width: 34px;
    height: 34px;
  }

  .section-heading,
  .transaction-heading,
  .market-heading,
  .chart-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .market-price {
    min-width: 0;
    text-align: left;
  }

  .chart-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .price-chart {
    height: 310px;
  }

  .chart-empty {
    margin-top: -310px;
  }

  .chart-footer p {
    text-align: left;
  }

  .stats,
  .field-grid,
  .catalog-summary,
  .learn-grid {
    grid-template-columns: 1fr;
  }

  .ownership-heading > div:first-child,
  .ownership-index-state {
    padding: 23px 20px;
  }

  .ownership-summary {
    grid-template-columns: 1fr 1fr;
  }

  .ownership-summary div {
    padding: 14px 16px;
  }

  .ownership-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .ownership-note > div {
    text-align: left;
  }

  .ownership-table {
    min-width: 0;
    table-layout: fixed;
  }

  .ownership-table th,
  .ownership-table td {
    overflow: hidden;
    padding: 11px 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ownership-table th:nth-child(1),
  .ownership-table td:nth-child(1) {
    width: 38px;
  }

  .ownership-table th:nth-child(2),
  .ownership-table td:nth-child(2) {
    width: 90px;
  }

  .ownership-table th:nth-child(3),
  .ownership-table td:nth-child(3) {
    width: 112px;
  }

  .ownership-table th:nth-child(5),
  .ownership-table td:nth-child(5) {
    display: none;
  }

  .ownership-table .wide-label {
    display: none;
  }

  .ownership-table .compact-label {
    display: inline;
  }

  .ownership-address,
  .ownership-balance,
  .ownership-share strong {
    font-size: 0.62rem;
  }

  .ownership-share {
    grid-template-columns: 44px minmax(24px, 1fr);
    gap: 5px;
  }

  .transaction-heading {
    padding: 23px 20px 20px;
  }

  .transaction-meta {
    width: 100%;
    grid-template-columns: repeat(3, 1fr);
  }

  .transaction-meta div {
    min-width: 0;
  }

  .tabs {
    gap: 24px;
    padding: 0 20px;
  }

  .ticket-entry,
  .order-review {
    padding: 24px 20px;
  }

  .entry-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .route-select {
    width: 100%;
    justify-content: space-between;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }

  .asset-value-row {
    grid-template-columns: minmax(0, 1fr) 125px;
  }

  .asset-value-row input,
  .asset-value-row output {
    font-size: clamp(1.35rem, 7vw, 1.9rem);
  }

  .asset-identity {
    gap: 7px;
    padding: 10px;
  }

  .asset-glyph {
    flex-basis: 30px;
    width: 30px;
    height: 30px;
  }

  .asset-identity small {
    display: none;
  }

  .route-strip,
  .ticket-setting {
    align-items: flex-start;
    flex-direction: column;
  }

  .precision-setting {
    width: 100%;
  }

  .precision-setting .segmented {
    display: grid;
    flex: 1;
    grid-template-columns: repeat(3, 1fr);
  }

  .precision-setting .segmented button {
    padding: 0 6px;
  }

  .stats article {
    padding: 17px;
  }

  .stats strong {
    margin-top: 10px;
  }

  .slippage-row {
    grid-template-columns: 1fr;
  }

  .segmented.compact {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

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

  .wallet-balances {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .learn-grid p {
    min-height: 0;
  }

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

  .footer nav {
    flex-wrap: wrap;
  }

  .guide-warning {
    align-items: flex-start;
    flex-direction: column;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
