:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --panel: #ffffff;
  --text: #172033;
  --muted: #687385;
  --line: #d9e0ea;
  --blue: #2454d6;
  --blue-dark: #173fba;
  --teal: #0f766e;
  --red: #b42318;
  --amber: #a15c08;
  --shadow: 0 22px 55px rgba(24, 33, 52, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
}

.network-pill {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.network-pill.ready {
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--teal);
}

.network-pill.wrong {
  border-color: rgba(161, 92, 8, 0.35);
  color: var(--amber);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

.faucet-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.token-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

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

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

.label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.token-summary strong,
.token-summary a {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.faucet-form {
  display: grid;
  gap: 10px;
  padding: 24px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  color: var(--text);
  font: inherit;
  outline: none;
  padding: 0 14px;
}

select {
  cursor: pointer;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 84, 214, 0.14);
}

.amount-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.amount-row:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(36, 84, 214, 0.14);
}

.amount-row input {
  min-height: 46px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.amount-row span {
  padding: 0 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

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

button {
  min-height: 46px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  padding: 0 12px;
}

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

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

.primary:hover:not(:disabled) {
  background: var(--blue-dark);
}

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

.secondary:hover:not(:disabled) {
  border-color: #b8c2d2;
  background: #f8fafc;
}

.status-line {
  min-height: 46px;
  border-top: 1px solid var(--line);
  padding: 14px 24px;
  color: var(--muted);
  font-size: 14px;
}

.status-line.success {
  color: var(--teal);
}

.status-line.error {
  color: var(--red);
}

.status-line.pending {
  color: var(--amber);
}

.tx-link {
  display: block;
  border-top: 1px solid var(--line);
  padding: 14px 24px 18px;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 20px, 560px);
    padding: 20px 0;
  }

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

  h1 {
    font-size: 28px;
  }

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

  .token-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 18px;
  }

  .token-summary > div:last-child {
    border-bottom: 0;
  }

  .faucet-form {
    padding: 18px;
  }

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