:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-muted: #f1f5f9;
  --text: #111827;
  --muted: #526074;
  --soft: #798396;
  --border: #d7dee8;
  --primary: #0a66ff;
  --primary-dark: #084fc4;
  --success: #087f5b;
  --success-bg: #e9fbf4;
  --danger: #b42318;
  --danger-bg: #fff1f0;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(10, 102, 255, 0.08), transparent 34rem),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  box-shadow: 0 0 0 3px rgba(10, 102, 255, 0.25);
  border-color: var(--primary);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1fr);
  gap: 24px;
  align-items: center;
}

.intro,
.request-panel,
.result-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.intro {
  padding: 32px;
}

.request-panel,
.result-panel {
  padding: 24px;
}

.brand-row,
.panel-header,
.field-row,
.action-row {
  display: flex;
  align-items: center;
}

.brand-row,
.panel-header {
  justify-content: space-between;
  gap: 16px;
}

.brand-row {
  justify-content: flex-start;
  margin-bottom: 40px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--text);
  color: #ffffff;
  font-weight: 800;
}

.brand-name {
  font-weight: 750;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.04;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.5rem, 7vw, 5.4rem);
}

h2 {
  font-size: 1.4rem;
}

.lede {
  max-width: 58ch;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.proof-grid div,
.resolved-card,
.status-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.proof-grid div {
  padding: 14px;
}

.proof-grid strong,
.proof-grid span {
  display: block;
}

.proof-grid strong {
  font-size: 0.9rem;
}

.proof-grid span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

form {
  margin-top: 24px;
}

.field {
  margin-bottom: 16px;
}

.field-row {
  gap: 12px;
  align-items: flex-start;
}

.field-row .field {
  flex: 1;
}

label,
.link-label,
.label {
  display: block;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  margin-top: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 12px 14px;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #929cad;
}

.amount-wrap {
  position: relative;
}

.amount-wrap input {
  padding-right: 72px;
}

.amount-wrap span {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-44%);
  color: var(--soft);
  font-size: 0.8rem;
  font-weight: 800;
}

.hint,
.error,
.status-card p {
  margin: 6px 0 0;
  font-size: 0.82rem;
}

.hint,
.status-card p {
  color: var(--muted);
}

.error {
  min-height: 1.25rem;
  color: var(--danger);
}

.primary-button,
.secondary-button,
.primary-link {
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 800;
  text-decoration: none;
}

.primary-button {
  width: 100%;
  background: var(--primary);
  color: #ffffff;
}

.primary-button:hover,
.primary-link:hover {
  background: var(--primary-dark);
}

.primary-button[disabled] {
  cursor: wait;
  opacity: 0.72;
}

.secondary-button {
  background: #ffffff;
  color: var(--text);
  border-color: var(--border);
  padding: 0 18px;
}

.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #ffffff;
  padding: 0 18px;
}

.network-pill,
.verified-pill {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.network-pill {
  background: #eef4ff;
  color: var(--primary);
}

.verified-pill {
  background: var(--success-bg);
  color: var(--success);
}

.status-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 14px;
}

.status-card.error-state {
  background: var(--danger-bg);
  border-color: #ffd0cc;
}

.status-card.success-state {
  background: var(--success-bg);
  border-color: #bff0dd;
}

.status-icon {
  display: grid;
  place-items: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: transparent;
}

.status-card.success-state .status-icon {
  background: var(--success);
}

.status-card.error-state .status-icon {
  background: var(--danger);
}

.result-panel {
  grid-column: 2;
  align-self: start;
  margin-top: -32px;
}

.resolved-card {
  display: grid;
  gap: 14px;
  margin: 22px 0;
  padding: 16px;
}

.resolved-card strong,
.resolved-card code {
  display: block;
  margin-top: 4px;
}

.resolved-card code,
textarea {
  font-family: "SF Mono", "Cascadia Mono", Consolas, monospace;
  font-size: 0.88rem;
  word-break: break-all;
}

.action-row {
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

@media (prefers-reduced-motion: no-preference) {
  .request-panel,
  .result-panel,
  .primary-button,
  .secondary-button,
  .primary-link {
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
  }

  .primary-button:hover,
  .secondary-button:hover,
  .primary-link:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .intro,
  .request-panel,
  .result-panel {
    grid-column: 1;
  }

  .result-panel {
    margin-top: 0;
  }
}

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

  .intro,
  .request-panel,
  .result-panel {
    padding: 20px;
  }

  h1 {
    max-width: 10ch;
    font-size: 2.7rem;
  }

  .proof-grid,
  .field-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .panel-header,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .network-pill,
  .verified-pill,
  .primary-link,
  .secondary-button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}
