:root {
  color: #131718;
  background: #f4f6f6;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: #f4f6f6;
}

button,
input {
  font: inherit;
}

button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #111516;
  border-radius: 6px;
  color: #ffffff;
  background: #111516;
  cursor: pointer;
  font-weight: 680;
}

button:hover:not(:disabled) {
  background: #2b3031;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(14, 143, 116, 0.28);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

button.secondary {
  color: #161a1b;
  border-color: #ccd2d2;
  background: #ffffff;
}

button.secondary:hover:not(:disabled) {
  border-color: #929b9b;
  background: #f7f9f9;
}

button.compact {
  min-height: 36px;
  padding: 0 13px;
  font-size: 13px;
}

a {
  color: inherit;
  text-decoration-color: #9aa3a3;
  text-underline-offset: 3px;
}

a[aria-disabled="true"] {
  pointer-events: none;
  text-decoration: none;
}

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid #d8dddd;
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #111516;
  font-weight: 760;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 28px;
  grid-template-columns: 1fr 12px 1fr;
  align-items: center;
  border: 1px solid #15191a;
  border-radius: 4px;
  overflow: hidden;
  background: #ffffff;
  font-size: 9px;
  text-align: center;
}

.brand-mark b {
  font-weight: 800;
}

.brand-mark i {
  width: 7px;
  height: 7px;
  margin: auto;
  border: solid #5b5bd6;
  border-width: 1px 1px 0 0;
  transform: rotate(45deg);
}

.network-cluster {
  display: flex;
  align-items: center;
  gap: 11px;
  color: #5c6465;
  font-size: 13px;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #176c59;
  font-weight: 700;
}

.status-dot::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1da47f;
  content: "";
}

.status-dot[data-state="error"] {
  color: #a23939;
}

.status-dot[data-state="error"]::before {
  background: #d34b4b;
}

.app-shell {
  display: grid;
  min-height: calc(100vh - 64px);
  grid-template-columns: minmax(260px, 310px) minmax(0, 1fr);
}

.identity-rail {
  padding: 28px 24px;
  border-right: 1px solid #d8dddd;
  background: #eef1f1;
}

.rail-heading {
  display: flex;
  align-items: center;
  gap: 16px;
}

#identity-mark {
  width: 64px;
  height: 64px;
  border: 1px solid #c6cccc;
  border-radius: 6px;
  image-rendering: pixelated;
  background: #ffffff;
}

.rail-heading strong {
  display: block;
  max-width: 170px;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label,
dt {
  color: #687172;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.wallet-actions {
  display: grid;
  gap: 8px;
  margin-top: 24px;
}

.identity-data {
  display: grid;
  gap: 15px;
  margin: 28px 0 0;
}

.identity-data div {
  min-width: 0;
}

.identity-data dd {
  margin: 6px 0 0;
  overflow: hidden;
  color: #272c2d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-list {
  display: grid;
  gap: 18px;
  margin: 36px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid #d4dada;
  list-style: none;
}

.progress-list li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 10px;
  color: #71797a;
  font-size: 13px;
  font-weight: 650;
}

.progress-list li span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #bcc4c4;
  border-radius: 50%;
  background: #f8fafa;
  font-size: 11px;
}

.progress-list li[data-state="complete"] {
  color: #176c59;
}

.progress-list li[data-state="complete"] span {
  color: #ffffff;
  border-color: #0e8f74;
  background: #0e8f74;
}

.workspace {
  width: 100%;
  max-width: 1220px;
  margin: 0 auto;
  padding: 30px 34px 40px;
}

.workspace-heading,
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

h1,
h2 {
  margin: 0;
  color: #111516;
}

h1 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  margin-top: 3px;
  font-size: 18px;
  line-height: 1.25;
}

.notice {
  max-width: min(480px, 50vw);
  padding: 7px 10px;
  overflow: hidden;
  border: 1px solid #d2d8d8;
  border-radius: 5px;
  color: #556061;
  background: #ffffff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notice[data-state="working"] {
  color: #3d51a7;
  border-color: #c8cef0;
  background: #f5f6ff;
}

.notice[data-state="error"] {
  color: #9d3434;
  border-color: #e5bcbc;
  background: #fff7f7;
}

.account-section,
.transfer-section,
.activity-section {
  border: 1px solid #d5dbdb;
  border-radius: 7px;
  background: #ffffff;
}

.account-section {
  margin-top: 24px;
  padding: 22px;
}

.button-row {
  display: flex;
  gap: 8px;
}

.metrics-grid {
  display: grid;
  margin: 22px 0 0;
  grid-template-columns: minmax(210px, 1.8fr) repeat(3, minmax(100px, 0.7fr));
  border: solid #e1e5e5;
  border-width: 1px 0;
}

.metrics-grid > div {
  min-width: 0;
  padding: 18px;
  border-right: 1px solid #e1e5e5;
}

.metrics-grid > div:first-child {
  padding-left: 0;
}

.metrics-grid > div:last-child {
  border-right: 0;
}

.metrics-grid dd {
  margin: 8px 0 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-metric dd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.faucet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  color: #5d6667;
  font-size: 13px;
}

.lower-grid {
  display: grid;
  margin-top: 20px;
  grid-template-columns: minmax(300px, 0.92fr) minmax(330px, 1.08fr);
  gap: 20px;
}

.transfer-section,
.activity-section {
  min-height: 360px;
  padding: 22px;
}

.sponsor-chip {
  padding: 5px 8px;
  border: 1px solid #b9ddd4;
  border-radius: 5px;
  color: #176c59;
  background: #f0faf7;
  font-size: 11px;
  font-weight: 750;
}

form {
  display: grid;
  margin-top: 24px;
}

form label {
  margin: 16px 0 7px;
  color: #4b5455;
  font-size: 12px;
  font-weight: 700;
}

form label:first-child {
  margin-top: 0;
}

input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #cbd1d1;
  border-radius: 5px;
  color: #15191a;
  background: #ffffff;
}

input::placeholder {
  color: #9ba3a4;
}

.amount-field {
  position: relative;
}

.amount-field input {
  padding-right: 58px;
}

.amount-field span {
  position: absolute;
  top: 50%;
  right: 12px;
  color: #656e6f;
  font-size: 12px;
  font-weight: 750;
  transform: translateY(-50%);
}

.submit-button {
  width: 100%;
  margin-top: 22px;
}

.activity-list {
  max-height: 280px;
  margin: 22px 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

.activity-list li {
  display: grid;
  min-height: 58px;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1.2fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e5e8e8;
  font-size: 12px;
}

.activity-list li strong {
  font-size: 12px;
}

.activity-list li a,
.activity-list li span {
  overflow: hidden;
  color: #586263;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-list time {
  color: #8a9293;
}

.activity-list .empty-state {
  display: grid;
  min-height: 200px;
  place-items: center;
  border: 1px dashed #d7dddd;
  border-radius: 6px;
  color: #858e8f;
}

.runtime-footer {
  margin-top: 20px;
  padding: 16px 0 0;
  border-top: 1px solid #d8dddd;
}

.runtime-footer dl {
  display: grid;
  margin: 0;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.runtime-footer dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: #626b6c;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .identity-rail {
    border-right: 0;
    border-bottom: 1px solid #d8dddd;
  }

  .identity-data,
  .progress-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .progress-list {
    gap: 12px;
  }

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

@media (max-width: 640px) {
  .topbar {
    min-height: 58px;
    padding: 0 14px;
  }

  .brand > span:last-child {
    display: none;
  }

  .network-cluster > span:last-child {
    display: none;
  }

  .identity-rail,
  .workspace {
    padding: 20px 14px;
  }

  .workspace-heading,
  .section-heading {
    align-items: flex-start;
  }

  .notice {
    max-width: 42vw;
  }

  .account-section,
  .transfer-section,
  .activity-section {
    padding: 18px 14px;
  }

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

  .metrics-grid > div,
  .metrics-grid > div:first-child {
    padding: 14px 8px;
    border-right: 0;
    border-bottom: 1px solid #e1e5e5;
  }

  .metrics-grid > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .faucet-row {
    align-items: stretch;
    flex-direction: column;
  }

  .activity-list li {
    grid-template-columns: 1fr auto;
  }

  .activity-list li a,
  .activity-list li span {
    grid-column: 1 / -1;
    grid-row: 2;
  }

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

@media (max-width: 480px) {
  .workspace-heading,
  .account-section > .section-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .notice {
    max-width: 100%;
  }

  .button-row button {
    flex: 1;
  }

  .progress-list {
    grid-template-columns: 1fr;
  }
}
