:root {
  --ink: #172033;
  --muted: #5b6878;
  --brand: #173f5f;
  --brand-deep: #102f49;
  --brand-soft: #e8f2f8;
  --accent: #0b6f67;
  --success: #16704a;
  --success-bg: #e8f6ef;
  --warning: #8a5b00;
  --warning-bg: #fff6dc;
  --danger: #a42d2d;
  --danger-bg: #fff0f0;
  --border: #d5e0e9;
  --surface: #ffffff;
  --surface-subtle: #f7fafc;
  --app-background: #f2f7fb;
  --shadow: 0 14px 38px rgba(23, 63, 95, 0.09);
  --radius: 16px;
  --radius-small: 10px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--app-background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

a:hover {
  color: var(--brand-deep);
}

code,
.monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

[hidden] {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(213, 224, 233, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
}

.page-shell {
  width: min(1120px, calc(100% - 36px));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.site-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--brand);
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-title {
  display: block;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
}

.site-subtitle {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.account-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.account-email {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

main {
  padding-block: 46px 72px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 28px;
  align-items: start;
  margin-bottom: 34px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.18;
}

h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.15rem, 5vw, 3.65rem);
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.lead {
  max-width: 720px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.requirements-card,
.workflow-card,
.notice-card,
.status-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.requirements-card {
  padding: 24px;
}

.requirements-card ul {
  display: grid;
  gap: 10px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.requirements-card li {
  position: relative;
  padding-left: 27px;
  color: var(--muted);
}

.requirements-card li::before {
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  content: "✓";
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 19px;
  text-align: center;
}

.testnet-badge {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--warning-bg);
  color: var(--warning);
  padding: 6px 10px;
  font-size: 0.78rem;
  font-weight: 800;
}

.stepper {
  margin: 0 0 26px;
}

.stepper ol {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.stepper li {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.stepper li:not(:last-child)::after {
  position: absolute;
  z-index: -1;
  top: 16px;
  left: 34px;
  right: 0;
  height: 2px;
  background: var(--border);
  content: "";
}

.step-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
}

.stepper li[data-state="current"] {
  color: var(--brand);
}

.stepper li[data-state="current"] .step-number {
  border-color: var(--brand);
  background: var(--brand);
  color: #ffffff;
}

.stepper li[data-state="complete"] {
  color: var(--success);
}

.stepper li[data-state="complete"] .step-number {
  border-color: var(--success);
  background: var(--success-bg);
  color: var(--success);
}

.stepper li[data-state="complete"]:not(:last-child)::after {
  background: var(--success);
}

.result {
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-left: 5px solid var(--brand);
  border-radius: var(--radius-small);
  background: var(--surface);
  padding: 14px 16px;
}

.result[data-kind="success"] {
  border-left-color: var(--success);
  background: var(--success-bg);
}

.result[data-kind="warning"] {
  border-left-color: var(--warning);
  background: var(--warning-bg);
}

.result[data-kind="error"] {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.workflow-stack {
  display: grid;
  gap: 22px;
}

.workflow-card {
  padding: clamp(22px, 4vw, 34px);
}

.workflow-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.step-kicker {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.section-copy {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

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

.form-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-subtle);
  padding: 22px;
}

.form-panel p:first-of-type {
  margin-top: 0;
}

form {
  display: grid;
  gap: 16px;
}

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

.form-field {
  display: grid;
  gap: 7px;
}

.form-field--full {
  grid-column: 1 / -1;
}

label,
.label {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #b9c8d4;
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 10px 12px;
}

input:focus,
select:focus,
button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(23, 63, 95, 0.25);
  outline-offset: 2px;
}

input[aria-invalid="true"] {
  border-color: var(--danger);
}

.help-text,
.small {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.checkbox-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
}

.checkbox-row input {
  width: 19px;
  min-height: auto;
  height: 19px;
  margin-top: 2px;
}

.button-row,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

button,
.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand);
  color: #ffffff;
  padding: 10px 16px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button-link:hover {
  background: var(--brand-deep);
  color: #ffffff;
}

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

button.secondary,
.button-link.secondary {
  border-color: var(--brand);
  background: transparent;
  color: var(--brand);
}

button.secondary:hover,
.button-link.secondary:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

button.tertiary {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 4px 6px;
}

button.tertiary:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.verification-panel {
  margin-top: 22px;
  border: 1px solid #aec7d8;
  border-radius: var(--radius-small);
  background: var(--brand-soft);
  padding: 22px;
}

.code-input {
  max-width: 280px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.summary-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-subtle);
  padding: 16px;
}

.summary-bar strong {
  display: block;
}

.status-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot[data-state="ok"] {
  background: var(--success);
}

.status-dot[data-state="warning"] {
  background: var(--warning);
}

.status-dot[data-state="error"] {
  background: var(--danger);
}

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

.metric {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-small);
  background: var(--surface-subtle);
  padding: 15px;
}

.metric-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.metric-value {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-address {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice-card {
  margin-top: 18px;
  box-shadow: none;
  padding: 16px 18px;
}

.notice-card--warning {
  border-color: #e4c97e;
  background: var(--warning-bg);
}

.notice-card--success {
  border-color: #add7c0;
  background: var(--success-bg);
}

.review-grid {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}

.review-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 14px;
}

.review-row:last-child {
  border-bottom: 0;
}

.review-label {
  color: var(--muted);
  font-weight: 750;
}

.hash-display {
  overflow-wrap: anywhere;
  word-break: break-all;
}

.transaction-box {
  margin-top: 18px;
  border-radius: var(--radius-small);
  background: var(--surface-subtle);
  padding: 16px;
}

.transaction-box p {
  margin: 0 0 8px;
}

.transaction-box p:last-child {
  margin-bottom: 0;
}

.site-footer {
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.site-footer__inner {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.86rem;
}

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

.centered-page {
  display: grid;
  min-height: calc(100vh - 161px);
  place-items: center;
}

.status-panel {
  width: min(620px, 100%);
  padding: 34px;
  text-align: center;
}

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

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

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

  .stepper li {
    grid-template-columns: 30px minmax(0, 1fr);
    font-size: 0.78rem;
  }

  .step-number {
    width: 30px;
    height: 30px;
  }

  .stepper li:not(:last-child)::after {
    top: 14px;
    left: 30px;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
  }

  .site-header__inner {
    min-height: 64px;
  }

  .site-subtitle,
  .account-email {
    display: none;
  }

  main {
    padding-block: 30px 52px;
  }

  .hero {
    gap: 20px;
    margin-bottom: 26px;
  }

  .requirements-card,
  .workflow-card,
  .status-panel {
    border-radius: 12px;
    padding: 20px;
  }

  .stepper {
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .stepper ol {
    min-width: 560px;
  }

  .form-grid,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .workflow-card__header,
  .site-footer__inner {
    display: grid;
  }

  .review-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .button-row,
  .form-actions {
    align-items: stretch;
  }

  .button-row button,
  .form-actions button,
  .button-link {
    width: 100%;
  }
}

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

.status-panel__actions {
  justify-content: center;
  margin-top: 24px;
}

#verificationStatus[data-kind="success"] {
  color: var(--success);
}

#verificationStatus[data-kind="error"] {
  color: var(--danger);
}

.legal-page {
  width: min(900px, calc(100% - 36px));
}

.legal-copy h2 {
  margin-top: 32px;
  font-size: 1.45rem;
}

.legal-copy p {
  max-width: 76ch;
}
